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

Christian Marquardt christian at marquardt.sc
Tue Apr 24 17:04:00 EDT 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