![](https://secure.gravatar.com/avatar/5450949473dc87e6639aa82bfcaa2c18.jpg?s=120&d=mm&r=g)
18 Apr
2007
18 Apr
'07
5:56 p.m.
Hi, I'm having a problem comparing some types when using numpy's argsort. I'm using numpy 1.0.2. I can reproduce it simply: Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] << snip >> In [1]: from numpy import argsort, sort, int32, array In [2]: x=array([1,3,2]) In [3]: aa=argsort(x) In [4]: as=sort(x) In [5]: type(aa[0]) Out[5]: <type 'numpy.int32'> In [6]: type(as[0]) Out[6]: <type 'numpy.int32'> In [7]: int32 Out[7]: <type 'numpy.int32'> In [8]: type(as[0])==int32 Out[8]: True In [9]: type(aa[0])==int32 Out[9]: False Any of the three indices in aa give me the same problem. Can someone explain if I should be doing this a different way, and if this is a bug?! Thanks, Rob