On Sat, Jul 26, 2014 at 9:19 AM, Lars Buitinck <larsm...@gmail.com> wrote:
>> Date: Fri, 25 Jul 2014 15:06:40 +0200
>> From: Olivier Grisel <olivier.gri...@ensta.org>
>> Subject: Re: [Numpy-discussion] change default integer from int32 to
>>         int64   on win64?
>> To: Discussion of Numerical Python <numpy-discussion@scipy.org>
>> Content-Type: text/plain; charset=UTF-8
>>
>> The dtype returned by np.where looks right (int64):
>>
>>>>> import platform
>>>>> platform.architecture()
>> ('64bit', 'WindowsPE')
>>>>> import numpy as np
>>>>> np.__version__
>> '1.9.0b1'
>>>>> a = np.zeros(10)
>>>>> np.where(a == 0)
>> (array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=int64),)
>
> Strange. In [1] we had to cast the result of np.where because it was
> an array of long. I ran through the NumPy code, and I couldn't find
> the flaw, but neither could I find a point in the history where it was
> fixed.
>
> [1] 
> https://github.com/scikit-learn/scikit-learn/commit/ebdeddbab1620c2473d04dc242d1e30684af9511

As far as I can tell, it's been that way essentially forever, before
numpy was numpy:

https://github.com/numpy/numpy/commit/8cb36a62#diff-88aedadb94e0ead6b434d55f81668471R645

-- 
Robert Kern
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to