[Numpy-discussion] NEP: Dispatch Mechanism for NumPy’s high level API (original) (raw)
Nathan Goldbaum nathan12343 at gmail.com
Tue Jun 5 20:41:25 EDT 2018
- Previous message (by thread): [Numpy-discussion] NEP: Dispatch Mechanism for NumPy’s high level API
- Next message (by thread): [Numpy-discussion] NEP: Dispatch Mechanism for NumPy’s high level API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Oh wait, since the decorated version of the ufunc will be the one in the public numpy API it won't break. It would only break if the callable that was passed in wasn't the decorated version, so it kinda has to pass in the decorated function to preserve backward compatibility. Apologies for the noise.
On Tue, Jun 5, 2018 at 7:39 PM, Nathan Goldbaum <nathan12343 at gmail.com> wrote:
Hmm, does this mean the callable that gets passed into arrayufunc will change? I'm pretty sure that will break the dispatch mechanism I'm using in my arrayufunc implementation, which directly checks whether the callable is in one of several tuples of functions that have different behavior.
On Tue, Jun 5, 2018 at 7:32 PM, Marten van Kerkwijk <_ _m.h.vankerkwijk at gmail.com> wrote:
Yes, the function should definitely be the same as what the user called - i.e., the decorated function. I'm only wondering if it would also be possible to have access to the undecorated one (via
coerce
orndarray._arrayfunction_
or otherwise). -- Marten
NumPy-Discussion mailing list NumPy-Discussion at python.org https://mail.python.org/mailman/listinfo/numpy-discussion -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180605/0deb0ab6/attachment.html>
- Previous message (by thread): [Numpy-discussion] NEP: Dispatch Mechanism for NumPy’s high level API
- Next message (by thread): [Numpy-discussion] NEP: Dispatch Mechanism for NumPy’s high level API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]