[Numpy-discussion] change default integer from int32 to int64 on win64?

Julian Taylor jtaylor.debian at googlemail.com
Wed Jul 23 13:19:58 EDT 2014


hi,
it recently came to my attention that the default integer type in numpy
on windows 64 bit is a 32 bit integers [0].
This seems like a quite serious problem as it means you can't use any
integers created from python integers < 32 bit to index arrays larger
than 2GB.
For example np.product(array.shape) which will never overflow on linux
and mac, can overflow on win64.

I think this is a very dangerous platform difference and a quite large
inconvenience for win64 users so I think it would be good to fix this.
This would be a very large change of API and probably also ABI.
But as we also never officially released win64 binaries we could change
it for from source compilations and give win64 binary distributors the
option to keep the old ABI/API at their discretion.

Any thoughts on this from win64 users?

Cheers,
Julian Taylor

[0] https://github.com/astropy/astropy/pull/2697



More information about the NumPy-Discussion mailing list