From: Francesc A. <fa...@ca...> - 2006-09-25 17:18:21
|
El dl 25 de 09 del 2006 a les 11:08 -0600, en/na Travis Oliphant va escriure: > Francesc Altet wrote: >=20 > >Hi, > > > >Anybody know if there is a map between NumPy types and Numeric > >typecodes? Something like 'typecodes' for numarray: > > =20 > > > How about >=20 > dtype(obj).char? This doesn't work for many types: >>> Numeric.array([1], typecode=3Dnumpy.dtype('int32').char) array([1]) this is fine, but: >>> Numeric.array([1], typecode=3Dnumpy.dtype('int16').char) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: typecode argument must be a valid type. >>> Numeric.array([1], typecode=3Dnumpy.dtype('int64').char) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: typecode argument must be a valid type. Anyway, this is not very important as I can do my own map internally. Thanks, --=20 >0,0< Francesc Altet http://www.carabos.com/ V V C=C3=A1rabos Coop. V. Enjoy Data "-" |