diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-06-10 18:49:06 -0700 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-06-10 19:41:48 -0700 |
commit | 8fabdecb556354559f9dcc280c75001f3df8aaa8 (patch) | |
tree | 40c1250ef7a0bd2a56bf477a4359b3ddf42de02a /numpy/array_api/_array_object.py | |
parent | 4cb688938be2ff20bf939c3917fde2f7634f0500 (diff) | |
download | numpy-8fabdecb556354559f9dcc280c75001f3df8aaa8.tar.gz |
ENH: Ensure dispatcher TypeErrors report original name
This replaces the name in the TypeError with the actually raised
name. In principle we could add one more check, because a
signature related TypeError must have a traceback with exactly
one entry (so `sys.exc_info()[2].tb_next is None`).
In practice this seems unnecessary though.
This ensures the following message:
>>> np.histogram(asdf=3)
TypeError: histogram() got an unexpected keyword argument 'asdf'
Closes gh-21647
Diffstat (limited to 'numpy/array_api/_array_object.py')
0 files changed, 0 insertions, 0 deletions