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 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion