[Numpy-discussion] ndarray subclassing bug?

Christoph T. Weidemann ctw@cogsci.i...
Sun Aug 10 14:50:15 CDT 2008

Thanks for the fast and informative answers!

On Sun you wrote:
> So no, you didn't do anything wrong. What behavior were you expecting ?

I was expecting that  calls to self.base would produce identical
results for objects of the TestArray class, no matter how these calls
are triggered. I used the base attribute to call ndarray functions on
my derived class and obviously that failed when base was NoneType. I
now realize that this is not a good/robust use of the base attribute
and I found a different way to implement the functionality I needed.

More information about the Numpy-discussion mailing list