diff options
author | Peter Andreas Entschev <peter@entschev.com> | 2020-11-17 10:45:56 -0800 |
---|---|---|
committer | Peter Andreas Entschev <peter@entschev.com> | 2020-11-17 10:45:56 -0800 |
commit | 5a3180cf8513910208e1653e40d9b8722d1c8756 (patch) | |
tree | e6659716aed3d0f47f87393773d26ab44ebc6f4e /numpy/core/overrides.py | |
parent | fff2845fc1322980b519e3f36592a0d716fd945d (diff) | |
download | numpy-5a3180cf8513910208e1653e40d9b8722d1c8756.tar.gz |
MAINT: Check like= type for __array_function__
Diffstat (limited to 'numpy/core/overrides.py')
-rw-r--r-- | numpy/core/overrides.py | 2 |
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.' |