summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Andreas Entschev <peter@entschev.com>2020-11-19 02:09:38 -0800
committerPeter Andreas Entschev <peter@entschev.com>2020-11-19 02:09:38 -0800
commit4241408d5970c551cf252295730f59d0848699d0 (patch)
tree4c7c63d5a780f8cadffaef709b4c5bb562dce011
parent1d7ad47a7bddfbdcdedbebe81ca87636f2e746ab (diff)
downloadnumpy-4241408d5970c551cf252295730f59d0848699d0.tar.gz
REV: Add array_function_dispatch_like helper
-rw-r--r--numpy/core/overrides.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/numpy/core/overrides.py b/numpy/core/overrides.py
index 71610b28b..c2b5fb7fa 100644
--- a/numpy/core/overrides.py
+++ b/numpy/core/overrides.py
@@ -34,15 +34,6 @@ def set_array_function_like_doc(public_api):
return public_api
-def array_function_dispatch_like(func, *args, **kwargs):
- if not hasattr(type(kwargs['like']), '__array_function__'):
- raise TypeError(
- 'The `like` object must implement the `__array_function__` '
- 'protocol.'
- )
- return func(*args, **kwargs)
-
-
add_docstring(
implement_array_function,
"""