diff options
author | Stephan Hoyer <shoyer@google.com> | 2018-10-18 11:33:54 -0700 |
---|---|---|
committer | Stephan Hoyer <shoyer@google.com> | 2018-10-18 11:33:54 -0700 |
commit | 1b8996e9477f38c8ced522c85df9ab9d73fcd339 (patch) | |
tree | 2e3be4f585a19716bf39fcbcfa0d3836d69391e4 /numpy/core | |
parent | d9917024e55d1ad99f8b47c5314629ccd821a47c (diff) | |
download | numpy-1b8996e9477f38c8ced522c85df9ab9d73fcd339.tar.gz |
MAINT: add __wrapped__ for Python 2 support
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/overrides.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/core/overrides.py b/numpy/core/overrides.py index 906292613..f9c48a156 100644 --- a/numpy/core/overrides.py +++ b/numpy/core/overrides.py @@ -149,6 +149,11 @@ def array_function_dispatch(dispatcher, verify=True): relevant_args = dispatcher(*args, **kwargs) return array_function_implementation_or_override( implementation, public_api, relevant_args, args, kwargs) + + # TODO: remove this when we drop Python 2 support (functools.wraps + # adds __wrapped__ automatically in later versions) + public_api.__wrapped__ = implementation + return public_api return decorator |