A Divendres 27 Octubre 2006 18:13, Joris De Ridder va escriure:
> Hi,
>
> The following did once work in NumPy:
> >>> dtype([int16])
> >>> dtype([[int16]])
> >>> dtype([uint,int32])
> >>> dtype(['f8','S10'])
>
> but now they all generate a "TypeError: data type not understood". Why?
Should be intended as well. If you try to set a dtype from a list, it has t=
o=20
follow the format of a description as specified in:
http://numpy.scipy.org/array_interface.shtml
for example:
In [67]: dtype([('f1', int16)])
Out[67]: dtype([('f1', '<i2')])
In [68]: dtype([('f1', int16, (2,2))])
Out[68]: dtype([('f1', '<i2', (2, 2))])
In [69]: dtype([('f1', int16, (2,2)), ('f3', int32)])
Out[69]: dtype([('f1', '<i2', (2, 2)), ('f3', '<i4')])
Cheers,
=2D-=20
>0,0< Francesc Altet =A0 =A0 http://www.carabos.com/
V V C=E1rabos Coop. V. =A0=A0Enjoy Data
"-"
|