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

NumPy numpy-tickets@scipy....
Mon Oct 6 07:44:15 CDT 2008


#926: NumPy array constructors are not honoring the shape in dtype
--------------------+-------------------------------------------------------
 Reporter:  faltet  |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:          
Component:  Other   |     Version:  none    
 Severity:  normal  |    Keywords:          
--------------------+-------------------------------------------------------
 The array constructors are shifting the shape in specified dtype into the
 ndarray object itself:

 {{{
 >>> a=numpy.empty([], dtype=('float64',(2, 2)))
 >>> a.shape
 (2, 2)
 >>> a.dtype.shape
 ()
 }}}

 while I would expect:

 {{{
 >>> a=numpy.empty([], dtype=('float64',(2, 2)))
 >>> a.shape
 ()
 >>> a.dtype.shape
 (2,2)
 }}}

 I need this in order to implement the capability to specify
 multidimensional atoms in !PyTables.  You can see a little discussion
 about this issue in:

 http://www.pytables.org/trac/ticket/133

 Thanks

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


More information about the Numpy-tickets mailing list