[Numpy-discussion] Returning ndimage subclass instances from scipy methods?

Keith Hughitt keith.hughitt@gmail....
Thu Aug 11 07:59:57 CDT 2011

Hi all,

Does anyone know if it is possible to have SciPy methods which work
on/return ndarray instances return subclass instances instead?

For example, I can pass in an instance of a ndarray subclass to methods in
scipy.ndimage, but a normal ndarray is returned instead of a new subclass
instance. Wrapping the result in __array_wrap__ and __array_finalize__ has
not seemed to help. I also tried asking on the scipy-users
but so far have not gotten any response.

Any suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110811/1ca7ae9c/attachment.html 

More information about the NumPy-Discussion mailing list