[Numpy-tickets] [NumPy] #344: Normalize shapes in dtype representation

NumPy numpy-tickets at scipy.net
Fri Oct 13 03:05:42 CDT 2006

#344: Normalize shapes in dtype representation
 Reporter:  faltet       |       Owner:  somebody
     Type:  enhancement  |      Status:  new     
 Priority:  low          |   Milestone:          
Component:  Other        |     Version:  devel   
 Severity:  minor        |    Keywords:          
 It would be nice if shapes in repr(dtype) could be normalized to use
 always tuples. For example:

 In [63]:dt1=numpy.dtype(('uint32', 2))
 In [64]:dt2=numpy.dtype(('uint32', (2,)))
 In [65]:dt1 == dt2
 In [66]:dt1.shape
 In [67]:dt2.shape
 # But....
 In [68]:dt1
 In [69]:dt2

 for an inexpert user, repr of dt1 and dt2 may lead him to think that they
 are different dtypes and they are not.

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

More information about the Numpy-tickets mailing list