From: Pierre GM <pgm...@gm...> - 2006-10-19 01:20:15
|
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) |