[Numpy-discussion] Adding to the non-dispatched implementation of NumPy methods
Marten van Kerkwijk
m.h.vankerkwijk at gmail.com
Tue Apr 23 10:30:38 EDT 2019
Reading the discussion again, I've gotten somewhat unsure that it is
helpful to formalize a way to call an implementation that we can and
hopefully will change. Why not just leave it at __wrapped__? I think the
name is no worse and it is more obvious that one relies on something
I ask in part since I could see a good case for having a special method
that is available only for functions that do no explicit casting to array,
i.e., that are ready to accept array mimics (and for which we're willing to
guarantee that would not change). For instance, functions like np.sinc that
really have no business using more than ufuncs under the hood, i.e., which
any class that has __array_ufunc__ can call safely. Or (eventually) all
those functions that just end up calling `concatenate` - those again could
easily be made safe for a class that just overrides `np.concatenate` using
__array_function__. In essence, this would be any function that does not do
`np.as(any)array` but just relies on array attributes.
But the above obviously presumes a vision of where this is headed, which
I'm not sure is shared...
All the best,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion