On Tue, Jun 5, 2018 at 2:47 PM Matti Picus <matti.pi...@gmail.com> wrote:

> What is the difference between the `func` provided as the first argument
> to `__array_function__` and `__array_ufunc__` and the "non-overloaded
> version of the provided function"?
>

The ""non-overloaded version of the provided function" is entirely
hypothetical at this point.

If we use a decorator to implement overloads, it would be the undecorated
function, e.g., the original definition of concatenate here:

@overload_for_array_function(['arrays', 'out'])def concatenate(arrays,
axis=0, out=None):
    ... # continue with the definition of concatenate


This NEP calls it an "arbitrary callable".
> In `__array_ufunc__` it turns out people count on it being exactly the
> `np.ufunc`.


Right, I think this is good guarantee to provide. Certainly it's one that
people fine useful.
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to