[SciPy-User] Having scipy.ndimage, etc. methods return ndarray subclass instances?
Wed Aug 3 10:58:51 CDT 2011
I'm currently working on creating a subclass of numpy.ndarray, and would
like to ensure that other methods that work with ndarrays (e.g.
scipy.ndimage.* <http://www.scipy.org/SciPyPackages/Ndimage>) return an
instance of the subclass instead of an ndarray.
After reading a discussion on the topic<http://stackoverflow.com/questions/6190859/some-numpy-functions-return-ndarray-instead-of-my-subclass>on StackOverflow, I looked into adding/modifying __array_finalize__
Neither of these appear to be called when I call a scipy.ndimage method such
Is there a way I can extend my subclass so that I can ensure that a new
subclass instance or view is returned instead of an ndarray?
Any suggestions would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User