-
-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Description
It would be nice if we could fix the fact that the __array_function__ implementation reports a bad name for its TypeErrors:
import numpy as np
np.histogram(asdf=3)
gives:
TypeError: _histogram_dispatcher() got an unexpected keyword argument 'asdf'
But it would be much nicer if that read histogram() got an unexpected keyword argument 'asdf'.
We should probably just override the name of the dispatcher functions? That could be done in the array-function decorators. Alternatively, it might just work to just rename the dispatchers themselves, but I am not 100% sure if all of them are defined directly "above" the functions that they belong to (so that this should work pretty easily).
WarrenWeckesser