[Numpy-discussion] is __array_ufunc__ ready for prime-time?
Marten van Kerkwijk
m.h.vankerkwijk at gmail.com
Sat Nov 4 09:47:15 EDT 2017
You just summarized excellently why I'm on a quest to change `asarray`
to `asanyarray` within numy (or at least add a `subok` keyword for
things like `broadcast_arrays`)! Obviously, this covers only ndarray
subclasses, not duck types, though I guess in principle one could use
the ABC registration mechanism mentioned above to let those types pass
Returning to the original topic of the thread, with `__array_ufunc__`
it now is even easier to keep track of your meta data for ufuncs, and
has become possible to massage input data before the ufunc is called
(rather than just the output).
All the best,
More information about the NumPy-Discussion