[Numpy-discussion] A bug in creating array of long int.

Shin sdhyok at email.unc.edu
Sat Sep 18 13:43:02 EDT 2004


I got the following strange value when converting a long integer into
numarray. I spent some time in tracking it down in my program.
Is it a bug or an expected one? Thanks.

>>> array([True])
array([1], type=Bool)
>>> array([1])
array([1])
>>> array([1L]) # How about preserving long int type?
array([1])
>>> array([10000000000000000L])
array([1874919424])  # Oops. The value is changed without any notice.

-- 
Daehyok Shin (Peter)






More information about the NumPy-Discussion mailing list