
25 Sep
2006
25 Sep
'06
10:41 a.m.
Francesc Altet wrote:
El dl 25 de 09 del 2006 a les 11:08 -0600, en/na Travis Oliphant va escriure:
Francesc Altet wrote:
Hi,
Anybody know if there is a map between NumPy types and Numeric typecodes? Something like 'typecodes' for numarray:
Oh, you mean actual Numeric typecodes, not Numeric-like typecodes :-)
dtype(obj).char will not work for the Numeric typecodes that changed, set up a dictionary-like object which uses dtype(obj).char on all but the ones that changed is my suggestion. See the core/numerictypes.py module for dictionary-like objects. Perhaps this would be a good thing to add to numpy/oldnumeric
'b' --> 'B' '1' --> 'b' 's' --> 'h' 'w' --> 'H' 'u' --> 'I'
-Travis