[Numpy-discussion] Oddity with numpy.int64 integer division

Christian Marquardt christian@marquardt...
Tue Apr 24 16:04:00 CDT 2007


Restore the invariant, and follow python.

This

   >>> -5 // 6
   -1

and

   >>> array([-5])[0] // 6
   0

simply doesn't make sense - in any language, you would expect that
all basic operators provide you with the same same answer when
applied to the same number, no?

  Christian.


On Tue, April 24, 2007 22:38, Alan G Isaac wrote:
> Do restore the invariant.
> Behave completely like Python if not too costly,
> otherwise follow C89.
>
> A user's view,
> Alan Isaac




More information about the Numpy-discussion mailing list