On Wednesday 18 October 2006 20:29, Stefan van der Walt wrote: > A quick question on extending numpy arrays: is it possible to easily > add an attribute to an ndarray?
It might be easier to create a subclass: pleasehave a look here: http://projects.scipy.org/scipy/numpy/attachment/wiki/MaskedArray/test_subclasses.py That's a tiny example of subclassing ndarrays, with some extra attributes. (BTW, I'm not sure that's the most obvious place where to look: if it turns out to be useful, I'll put it on the scipy wiki) ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion