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

Christian Marquardt christian@marquardt...
Mon Apr 23 15:20:48 CDT 2007

Dear all,

this is odd:

   >>> import numpy as np
   >>> fact = 28250000L * 86400L
   >>> nn = np.array([-20905000L])
   >>> nn
   array([-20905000], dtype=int64)
   >>> nn[0] // fact


   >>> long(nn[0]) // fact

Is this a bug in numpy, or in python's implementation of longs? I would
think both should give the same, really... (Python 2.5, numpy 1.0.3dev3725,
Linux, Intel compilers...)

Many thanks for any ideas / advice,


More information about the Numpy-discussion mailing list