[Numpy-discussion] A bug in creating array of long int.
perry at stsci.edu
Sat Sep 18 13:55:00 CDT 2004
Daehyok Shin (Peter) wrote:
> 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(, type=Bool)
> >>> array()
> >>> array([1L]) # How about preserving long int type?
> >>> array([10000000000000000L])
> array() # Oops. The value is changed without any notice.
So, what were you hoping would happen? An exception? Automatically setting
type to Int64? (and if that case, what about values too large for Int64s?)
(I'm assuming you are aware that Python longs are not 64 bit ints).
This probably could be handled better. We'll look into it.
More information about the Numpy-discussion