[SciPy-dev] Fwd: bug in argmax?

Alan G Isaac aisaac@american....
Sat Feb 9 17:50:11 CST 2008


Is the behavior below a bug, as I believe?
(Two different types claim to be numpy.int32.)
If so, I will open a ticket.

Thank you,
Alan Isaac



------ Forwarded message ------

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310
32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as N 
>>> N.__version__ 
'1.0.4'
>>> test1=N.int32(32)
>>> type(test1)
<type 'numpy.int32'>
>>> type(test1) is N.int32 
True
>>> id(type(test1))
1810419616
>>> test2 = N.array([3,2,1]).argmax()
>>> type(test2)
<type 'numpy.int32'>
>>> type(test2) is N.int32 
False
>>> id(type(test2))
1810419808

-------- End of message -------




More information about the Scipy-dev mailing list