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

Robert Kern robert.kern at gmail.com
Thu Jul 24 05:46:00 EDT 2014


On Thu, Jul 24, 2014 at 10:39 AM, Lars Buitinck <larsmans at gmail.com> wrote:
> Wed, 23 Jul 2014 22:13:33 +0100  Nathaniel Smith <njs at pobox.com>:
>> On Wed, Jul 23, 2014 at 9:57 PM, Robert Kern <robert.kern at gmail.com> wrote:
>>> That's perhaps what you want, but numpy has never claimed to do this.
>
> ... except in np.where, which promises to return indices but actually
> returns arrays of longs and thus doesn't work with large arrays on
> Windows.
>
> I know this is a bug that can be fixed without changing the size of
> np.int, but it goes to show that even core functionality in NumPy gets
> it wrong.

Does it? I don't have my Windows VM available at the moment, but it
looks like PyArray_Nonzero() is correctly returning an intp array:

https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/item_selection.c#L2478

If it is incorrect somewhere else, please submit a bug report.

-- 
Robert Kern



More information about the NumPy-Discussion mailing list