diff options
author | Stephan Hoyer <shoyer@google.com> | 2018-12-01 11:43:16 -0800 |
---|---|---|
committer | Stephan Hoyer <shoyer@google.com> | 2018-12-01 11:49:28 -0800 |
commit | bc143e02a20a23ca8c1b426f41201160eca0e376 (patch) | |
tree | 7fc7a7506375ba7848bf4f803333da0e23bcb405 /numpy/_pytesttester.py | |
parent | b3a435305082699c26445630d9c79587d51ba9f1 (diff) | |
download | numpy-bc143e02a20a23ca8c1b426f41201160eca0e376.tar.gz |
MAINT: remove wrapper functions from numpy.core.multiarray
The original motivation for the style of these wrapper functions, introduced
in gh-12175, was to preserve introspection. But it turns out NumPy's functions
defined in C don't support introspection anyways, so the extra wrapper
functions are entirely pointless.
This version reverts the additional wrapper functions, which put default
arguments in two places and introduced slow-down due to the overhead of
another function call.
I've retained docstrings in multiarray.py, since it's definitely more readable
to keep docstrings and dispatchers together rather than leaving docstrings in
_add_newdocs.py.
One bonus of this approach is that dispatcher functions have the same name
as their implementations, so `np.concatenate(unknown=True)` gives an
error message mentioning "concatenate" rather than "_concatenate_dispatcher":
`TypeError: concatenate() got an unexpected keyword argument 'unknown'`
Diffstat (limited to 'numpy/_pytesttester.py')
0 files changed, 0 insertions, 0 deletions