[Numpy-discussion] Oddity with numpy.int64 integer division
Tue Apr 24 16:08:11 CDT 2007
Christian Marquardt wrote:
> Restore the invariant, and follow python.
> >>> -5 // 6
> >>> array([-5]) // 6
> 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?
Not if they are different types, you don't, e.g. -5.0 / 6 .
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion