[Numpy-discussion] Segmentation fault with argsort

Keith Goodman kwgoodman at gmail.com
Fri Dec 18 13:01:19 EST 2009


On Fri, Dec 18, 2009 at 9:52 AM, Robert Kern <robert.kern at gmail.com> wrote:
> On Fri, Dec 18, 2009 at 11:46, Keith Goodman <kwgoodman at gmail.com> wrote:
>> I am using the numpy 1.3 binary from Ubuntu 9.10. Is this already
>> known, fixed, reproducible?
>>
>>>> np.array(121).argsort(0).argsort(0)
>> Segmentation fault
>>
>> The expected result:
>>
>> AttributeError: 'np.int64' object has no attribute 'argsort'
>
> Why would you expect that? On OS X with an SVN checkout ~1.4:
>
> In [1]: np.array(121).argsort(0).argsort(0)
> Out[1]: 0
>
> In [6]: np.int64.argsort
> Out[6]: <method 'argsort' of 'numpy.generic' objects>

Oh, I didn't realize numpy scalars had all of the methods of arrays.



More information about the NumPy-Discussion mailing list