summaryrefslogtreecommitdiff
path: root/numpy/core/overrides.py
diff options
context:
space:
mode:
authorPeter Andreas Entschev <peter@entschev.com>2020-11-17 10:45:56 -0800
committerPeter Andreas Entschev <peter@entschev.com>2020-11-17 10:45:56 -0800
commit5a3180cf8513910208e1653e40d9b8722d1c8756 (patch)
treee6659716aed3d0f47f87393773d26ab44ebc6f4e /numpy/core/overrides.py
parentfff2845fc1322980b519e3f36592a0d716fd945d (diff)
downloadnumpy-5a3180cf8513910208e1653e40d9b8722d1c8756.tar.gz
MAINT: Check like= type for __array_function__
Diffstat (limited to 'numpy/core/overrides.py')
-rw-r--r--numpy/core/overrides.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/overrides.py b/numpy/core/overrides.py
index 7920e8b5e..71610b28b 100644
--- a/numpy/core/overrides.py
+++ b/numpy/core/overrides.py
@@ -35,7 +35,7 @@ def set_array_function_like_doc(public_api):
def array_function_dispatch_like(func, *args, **kwargs):
- if not hasattr(kwargs['like'], '__array_function__'):
+ if not hasattr(type(kwargs['like']), '__array_function__'):
raise TypeError(
'The `like` object must implement the `__array_function__` '
'protocol.'