|
From: Francesc A. <fa...@ca...> - 2006-01-24 09:43:57
|
A Dilluns 23 Gener 2006 23:31, Colin J. Williams va escriure: > >>> a=3D _mu.array([1, 2], dtype=3D _nt.uint8) > >>> a+254 > > array([255, 256], dtype=3Dint16) > > This does bring out a possible problem with the new type. str of the > old type returned the input name int8, float64 etc. Is there some > method of the new type which returns the name input, 'int8' in the above > example? In most cases, the mnemonic is more helpful than the letter > coding. Yes. a.dtype.name does the trick. Cheers, =2D-=20 >0,0< Francesc Altet =A0 =A0 http://www.carabos.com/ V V C=E1rabos Coop. V. =A0=A0Enjoy Data "-" |