[Numpy-tickets] [NumPy] #737: String to integer conversion inconsistent.

NumPy numpy-tickets@scipy....
Sun Apr 13 13:00:33 CDT 2008


#737: String to integer conversion inconsistent.
---------------------+------------------------------------------------------
 Reporter:  charris  |       Owner:  somebody
     Type:  defect   |      Status:  new     
 Priority:  normal   |   Milestone:  1.0.5   
Component:  Other    |     Version:  none    
 Severity:  normal   |    Keywords:          
---------------------+------------------------------------------------------
 To wit:


 {{{
 In [1]: int8('12')
 Out[1]: array([1, 2], dtype=int8)

 In [2]: int32('12')
 Out[2]: 12
 }}}


 I suspect int32 behaves differently because it is a subtype of the python
 integer and so behaves as (I) would expect. If int32 is indeed a subtype
 of the python int I think that is also an error as Python ints are longs.

-- 
Ticket URL: <http://scipy.org/scipy/numpy/ticket/737>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list