[Numpy-discussion] can't resize ndarray subclass
oliphant.travis at ieee.org
Tue Feb 28 14:20:00 EST 2006
Zachary Pincus wrote:
> Thanks Travis for the replies and the new functionality in the SVN!
> I think I have enough (well, maybe once I figure out
> __array_priority__) to get a decent wiki entry for subclassing
> ndarray, and maybe some template subclasses that others can use.
> I presume __array_priority__ determines the resulting type when two
> different type arrays are ufunc'd together? The exact mechanism of
> which object gets selected as the parent, etc., is still unclear though.
When two different subclasses appear in a ufunc (or in other places in
ndarray), the subclass chosen for creation is the one with highest
The "parent" concept is entirely separate is the object passed to
__array_finalize__ and should be of the same type as self (or None).
More information about the NumPy-Discussion