[Numpy-tickets] [NumPy] #926: NumPy array constructors are not honoring the shape in dtype

NumPy numpy-tickets@scipy....
Thu Oct 9 10:48:50 CDT 2008


#926: NumPy array constructors are not honoring the shape in dtype
--------------------+-------------------------------------------------------
 Reporter:  faltet  |        Owner:  somebody   
     Type:  defect  |       Status:  closed     
 Priority:  normal  |    Milestone:  Unscheduled
Component:  Other   |      Version:  none       
 Severity:  normal  |   Resolution:  wontfix    
 Keywords:          |  
--------------------+-------------------------------------------------------
Changes (by oliphant):

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

Comment:

 This behavior is actually desirable for returning an array on accessing
 the elements of a field.  If you really want a 0-d array, then create a
 data-type with a field name:

 a = empty([], dtype=[('', ('float', (2,2)))])

 a.shape
 ()

-- 
Ticket URL: <http://scipy.org/scipy/numpy/ticket/926#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