[Numpy-tickets] [NumPy] #474: Record type inconsistency between rank 0 recarrays and rank > 0 recarrays

NumPy numpy-tickets@scipy....
Sat Mar 31 13:26:25 CDT 2007


#474: Record type inconsistency between rank 0 recarrays and rank > 0 recarrays
-----------------------------------------------------------+----------------
 Reporter:  SuperElectric                                  |        Owner:  somebody
     Type:  defect                                         |       Status:  closed  
 Priority:  normal                                         |    Milestone:          
Component:  numpy.core                                     |      Version:          
 Severity:  normal                                         |   Resolution:  fixed   
 Keywords:  rank, rank-0, vectorization, recarray, record  |  
-----------------------------------------------------------+----------------
Changes (by oliphant):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 I made this change.  Now field selection on 0-d arrays will return 0-d
 arrays.  This can possibly disrupt some codes (it did in scipy's mio5.py
 file), but the fix is easy (just use arr.item() to get a Python scalar or
 arr[()] to get a numpy scalar from the 0-d array).

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


More information about the Numpy-tickets mailing list