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

Todd Miller jmiller at stsci.edu
Mon Sep 20 04:29:01 CDT 2004


On Sat, 2004-09-18 at 17:28, Shin wrote:
> > So, what were you hoping would happen? An exception? Automatically setting
> > type to Int64?
> 
> Don't you think it is better to convert long integers into Int64, and
> raising at least a warning if there are values too large for Int64?

That sounds good to me.  I was wondering if the array type should also
be value dependent, as in driven by Python longs with values outside the
range of Int32,  but I think a simple rule would be best.  Barring
objections,  I'll look into adding code that will force Int64 for any
sequence containing Python longs and raise an exception for those longs
which don't fit in Int64.

Regards,
Todd





More information about the Numpy-discussion mailing list