[Numpy-tickets] [NumPy] #290: Some inconsistency in 'i' typecode

NumPy numpy-tickets at scipy.net
Fri Sep 22 13:25:25 CDT 2006


#290: Some inconsistency in 'i' typecode
--------------------+-------------------------------------------------------
 Reporter:  faltet  |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:          
Component:  Other   |     Version:          
 Severity:  normal  |    Keywords:          
--------------------+-------------------------------------------------------
 Hi,

 I find the next to be rather strange:

 {{{
 In [118]: numpy.dtype(numpy.int32) == numpy.int32
 Out[118]: True

 In [119]: numpy.dtype("i") == numpy.int32
 Out[119]: True

 In [120]: numpy.array([1], dtype=numpy.int32).dtype.type == numpy.int32
 Out[120]: True

 In [121]: numpy.array([1], dtype="i").dtype.type == numpy.int32
 Out[121]: False

 }}}

 i.e. using a 'i' typecode doesn't generate a true numpy.int32, despite the
 fact that the dtype constructor seems to create a valid one. The version
 of numpy here is 1.0b5.dev3084.

 Cheers,

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


More information about the Numpy-tickets mailing list