James Porter wrote:
Functions like numpy.zeros_like use ndarray.__new__(subtype, ...) to create new arrays based on the shape of other arrays.

Maybe the real answer to this question is "NumPy is doing it wrong"

Yes, I think NumPy is doing it wrong, even for subclasses
written in Python. If the subtype has overridden ndarray's
__new__ method, the way NumPy is doing it will skip the
subclass's version of the method.

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to