|
From: Francesc A. <fa...@ca...> - 2006-02-07 10:54:49
|
A Dimarts 07 Febrer 2006 01:08, Travis Oliphant va escriure: > In SVN of numpy, the dtype objects now have a .base attribute and a > .shape attribute. > > The .shape attribute returns (1,) or the shape of the sub-array. Uh, it wouldn't be better to put .shape =3D 1 in case of a scalar field and (...) for a non-scalar field? Remember that this is the current convention for the numpy protocol. > The .base attribute returns the data-type object of the base-type, or a > new reference to self, if the object has no base.type. > > Thus, in current SVN > > dtype['x'].base.name would always give you what you want. Great. I like it. Thanks! =2D-=20 >0,0< Francesc Altet =A0 =A0 http://www.carabos.com/ V V C=E1rabos Coop. V. =A0=A0Enjoy Data "-" |