summaryrefslogtreecommitdiff
path: root/numpy/core/overrides.py
diff options
context:
space:
mode:
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.'