[Numpy-discussion] Inconsistency in dtype.arrdescr?

Francesc Altet faltet at carabos.com
Mon Jan 16 08:57:24 EST 2006


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,

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"






More information about the NumPy-Discussion mailing list