[Numpy-discussion] NEP: Dispatch Mechanism for NumPy’s high level API (original) (raw)

Stephan Hoyer shoyer at gmail.com
Fri Jun 8 12:39:49 EDT 2018


On Fri, Jun 8, 2018 at 8:58 AM Marten van Kerkwijk < m.h.vankerkwijk at gmail.com> wrote:

I think we're getting to the stage where an updated text would be useful.

Yes, I plan to work on this over the weekend. Stay tuned!

For that, you may want to consider an actual implementation of, e.g., a very simple function like np.reshape as well as a more complicated one like np.concatenate

Yes, I agree that actual implementation (in Python rather than C for now) would be useful.

and in particular how the implementation finds out where its own instances are located.

I think we've discussed this before, but I don't think this is feasible to solve in general given the diversity of wrapped APIs. If you want to find the arguments in which a class' own instances appear, you will need to do that in your overloaded function.

That said, if merely pulling out the flat list of arguments that are checked for and/or implement array_function would be enough, we can probably figure out a way to expose that information. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180608/5d2597db/attachment.html>



More information about the NumPy-Discussion mailing list