[Numpy-discussion] Revised NEP-18, __array_function__ protocol

Marten van Kerkwijk m.h.vankerkwijk at gmail.com
Sat Jun 30 10:02:52 EDT 2018


Hi Hameer,


It is. The point of the proposed feature was to handle array generation
> mechanisms, that don't take an array as input in the standard NumPy API.
> Giving them a reference handles both the dispatch and the decision about
> which implementation to call.
>

Sorry, I had clearly misunderstood. It would indeed be nice for overrides
to work on functions like `zeros` or `arange` as well, but it seems strange
to change the signature just for that. As a possible alternative, should we
perhaps generally check for overrides on `dtype`?

All the best,

Marten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180630/d9b34bcf/attachment.html>


More information about the NumPy-Discussion mailing list