[Numpy-discussion] Adding to the non-dispatched implementation of NumPy methods

Nathaniel Smith njs at pobox.com
Sun Apr 28 15:03:41 EDT 2019

On Sun, Apr 28, 2019, 02:22 Ralf Gommers <ralf.gommers at gmail.com> wrote:

> One other thought: the proposal in this thread is about skipping the
> override mechanism for numpy functions. NEP 18 reserves the freedom to swap
> out __array_function__ with __array_ufunc__ if we make something a ufunc.
> So __skipping_array_function__ is too limited a name, __skipping_override__
> or similar would be better. And then make __array_ufunc__ respect it as
> well.

Heh, that's opening a can of worms.

Stephen, you're the one who's been working with the folks requesting this
skipping feature. Can you comment on how this would fit in to what they're
trying to do? Do they need the ability to skip __array_ufunc__ too?

Up thread, I argued that if we end up with both __asduckarray__ and
__skipping_array_function__, then that means we can't call
__array_function__ on the result from __asduckarray__, because that would
break the layering that we're trying to use to keep this pile of features
factored out enough to understand.

But we definitely want to call __array_ufunc__ on the result from
__asduckarray__. So if __skipping_array_function__ also applies to
__array_ufunc__, then that creates the same problem.

One possibility is to leave __array_ufunc__ out of this for now, and if it
later becomes an issue then we can debate the semantics of
__skipping_array_ufunc__ as a seperate issue.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20190428/9523c296/attachment.html>

More information about the NumPy-Discussion mailing list