[Numpy-discussion] Inconsistency in dtype.arrdescr?

Colin J. Williams cjw at sympatico.ca
Mon Jan 16 14:23:04 EST 2006


Francesc Altet wrote:

>Hi,
>
>I find the next a bit misleading:
>
>  
>
>>>>numpy.array((3,), dtype='u4').dtype.arrdescr
>>>>        
>>>>
>[('', '<u4')]
>
>but...
>
>  
>
>>>>numpy.zeros((3,), dtype='u4,u2').dtype.arrdescr
>>>>        
>>>>
>[('f1', '<u4'), ('f2', '<u2')]
>
>I think it would be more consistent if the former expression would give
>as output:
>
>[('f1', '<u4')]
>
>Cheers,
>
>  
>
Why not respond with a simple character string, such as f1, <u4?

Colin W.




More information about the NumPy-Discussion mailing list