[Numpy-discussion] my derived ndarray class object loses its attribute after a transpose()

Pierre GM pgmdevlist at gmail.com
Fri Nov 23 09:37:29 EST 2007


On Friday 23 November 2007 03:25:37 Sebastian Haase wrote:
> Hi,
> this question might habe been answered before:
> I have my own ndarray-derived class. I did this, so that I can add
> another "custom attribute" -- let's say
> arr.filename

Sebastian,
Could you post the __new__ and __array_finalize__ for your class ? Are you 
sure you update the attribute in __array_finalize__ ?
And this page may come handy:
http://www.scipy.org/Subclasses



More information about the NumPy-Discussion mailing list