Quansight-Labs / uarray

A general dispatch and override mechanism for Python.
https://uarray.org/
BSD 3-Clause "New" or "Revised" License
101 stars 26 forks source link

Functions taking **kwargs #171

Closed peterbell10 closed 5 years ago

peterbell10 commented 5 years ago

uarray does not support funtions taking arbitrary keyword arguments because of this line: https://github.com/Quansight-Labs/uarray/blob/619e12000561b702fbbf7f228b0ce353a907af6f/uarray/_backend.py#L138 This silently drops any unknown keyword arguments.

As far as I can tell, the main motivation for this is to support cases where argument_replacer returns extra keyword arguments as is the case with https://github.com/Quansight-Labs/uarray/blob/619e12000561b702fbbf7f228b0ce353a907af6f/unumpy/multimethods.py#L28-L33 which (as I found out in #170) is used with functions where dtype is not a valid kwarg.

peterbell10 commented 5 years ago

Why was this closed?

hameerabbasi commented 5 years ago

I committed to master with a magic comment that fixed this issue. 😄

peterbell10 commented 5 years ago

Ah, I see. Thanks!