[NumPy-Tickets] [NumPy] #1647: int32() different behaviour under 1.3.0 and 1.4.1 for single-element arrays

NumPy Trac numpy-tickets@scipy....
Sun Oct 24 10:12:34 CDT 2010


#1647: int32() different behaviour under 1.3.0 and 1.4.1 for single-element arrays
----------------------+-----------------------------------------------------
 Reporter:  phaustus  |       Owner:  somebody
     Type:  defect    |      Status:  new     
 Priority:  normal    |   Milestone:  2.0.0   
Component:  Other     |     Version:  1.5.0   
 Keywords:            |  
----------------------+-----------------------------------------------------
 Hi,

 Under numpy 1.4.1, the output of:

 > int32(array([0.]))

 is simply "0", whereas under numpy 1.3.0, the output is
 "array([0], dtype=int32)".  While the former is a number,
 the latter is an array.  Interestingly, the output for

 > int32(array([0.,1.]))

 and for

 > int32(array([]))

 is the same in each version (i.e., both return arrays).

 I apologize if this has already been addressed.  I did a search and found
 nothing.

 Cheers,

 Phaustus

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1647>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list