[Numpy-discussion] is __array_ufunc__ ready for prime-time?

Stephan Hoyer shoyer at gmail.com
Thu Nov 2 20:35:36 EDT 2017


On Thu, Nov 2, 2017 at 3:35 PM Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

> Ah, but what if the dtype modifies the interface? That might sound evil,
> but it's something that's been proposed. For example, if I wanted to
> replace yt's YTArray in a backward compatibile way with a dtype and just
> use plain ndarrays everywhere, the dtype would need to *at least* modify
> ndarray's API, adding e.g. to(), convert_to_unit(), a units attribute, and
> several other things.
>

I suppose we'll need to sort this out. But adding new methods/properties
feels pretty safe to me, as long as existing ones are guaranteed to work in
the same way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20171103/e7698c7f/attachment.html>


More information about the NumPy-Discussion mailing list