Re: [Numpy-discussion] Implementations of ndarray.__array_function__ (and ndarray.__array_ufunc__)

2018-11-05 Thread Marten van Kerkwijk
On Sun, Nov 4, 2018 at 8:57 PM Stephan Hoyer wrote: > On Sun, Nov 4, 2018 at 8:45 AM Marten van Kerkwijk < > m.h.vankerkw...@gmail.com> wrote: > >> Does the above make sense? I realize that the same would be true for >> `__array_ufunc__`, though there the situation is slightly trickier since it

Re: [Numpy-discussion] Implementations of ndarray.__array_function__ (and ndarray.__array_ufunc__)

2018-11-04 Thread Stephan Hoyer
On Sun, Nov 4, 2018 at 8:45 AM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > Does the above make sense? I realize that the same would be true for > `__array_ufunc__`, though there the situation is slightly trickier since it > is not as easy to bypass any further override checks.

[Numpy-discussion] Implementations of ndarray.__array_function__ (and ndarray.__array_ufunc__)

2018-11-04 Thread Marten van Kerkwijk
Hi again, Another thought about __array_function__, this time about the implementation for ndarray. In it, we currently check whether any of the types define a (different) __array_function__, and, if so, give up. This seems too strict: I think that, at least in principle, subclasses should be