[Numpy-discussion] ndarray subclassing bug?

Christoph T. Weidemann ctw at cogsci.info
Sun Aug 10 15:50:15 EDT 2008


Pierre,
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