[Numpy-discussion] Please help with subclassing numpy.ndarray

Sturla Molden sturla@molden...
Tue Feb 6 08:17:39 CST 2007

> I don't pretend to know all the inner workings of subclassing, but I
> don't think that would work, given the following output:

> In [6]: x+y
> This is where __array_finalize__ is called
> Out[6]: MyArray([4, 5, 6])

Why is not __new__ called for the return value of x + y? Does it call
__new__ for ndarray instead of MyArray?

More information about the Numpy-discussion mailing list