[Numpy-tickets] [NumPy] #308: Array protocol issues in creating recarrays

NumPy numpy-tickets at scipy.net
Mon Oct 2 11:45:44 CDT 2006


#308: Array protocol issues in creating recarrays
--------------------+-------------------------------------------------------
 Reporter:  faltet  |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  1.0 Release
Component:  Other   |     Version:  devel      
 Severity:  normal  |    Keywords:             
--------------------+-------------------------------------------------------
 Hi,

 numpy is having problems creating recarrays from numarray columns:

 {{{
 >>> numpy.rec.array([numpy.array([1,3]),numpy.array([2,3])],
 dtype="i4,i4")
 recarray([(1, 2), (3, 3)],
       dtype='[('f0', '<i4'), ('f1', '<i4')]')   # Fine, but...
 >>> numpy.rec.array([numarray.array([1,3]),numarray.array([2,3])],
 dtype="i4,i4")
 recarray([[(-1209141984, -1209141984), (105, 4)],   # bad data!
        [(-1209141984, -1209141984), (105, 4)]],     # bad data!
       dtype='[('f0', '<i4'), ('f1', '<i4')]')

 }}}

 i.e. it seems like if array protocol is not being applied correctly when
 the sequence is made of objects that are not numpy.

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


More information about the Numpy-tickets mailing list