dtype() examples that used to work

Francesc Altet faltet at carabos.com
Fri Oct 27 12:06:13 CDT 2006

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 to 
follow the format of a description as specified in:


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')])


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

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo

More information about the Numpy-discussion mailing list