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

Pierre GM pgmdevlist@gmail....
Fri Nov 23 08:37:29 CST 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