[Numpy-discussion] Best representation for array of points, or, how to distinguish a Nx1 array of points from a Nx3 array of scalars
Stefan van der Walt
stefan at sun.ac.za
Thu Oct 4 13:33:01 EDT 2007
On Thu, Oct 04, 2007 at 11:47:40AM -0500, Robert Kern wrote:
> Edson Tadeu wrote:
>
> > * Is there any field in the NumPy object where I can keep this
> > information (the shape of the "element"), without creeping it with the
> > dtype='(M,N)f8' representation I explained above?
>
> There isn't. You could make a subclass that tracks this, but you would have to
> implement it carefully to maintain the information.
There is an example of how to do that here:
http://www.scipy.org/Subclasses
Regards
Stéfan
More information about the NumPy-Discussion
mailing list