summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-06-11 23:10:39 -0700
committerEric Wieser <wieser.eric@gmail.com>2018-06-12 09:06:27 -0700
commit29e68f62a29e5c8b9da4ff63d912ae10cda10e15 (patch)
treee50560648b65f81f212e594f6b116f5043193430 /numpy/lib
parent8eeab6d3805bd35d87d4d7506451ad6eb6a51aed (diff)
downloadnumpy-29e68f62a29e5c8b9da4ff63d912ae10cda10e15.tar.gz
BUG/MAINT: Handle errors in __array_wrap__ the same way in ufunc.reduce as in ufunc.__call__
Previously they were silenced
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/tests/test_ufunclike.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_ufunclike.py b/numpy/lib/tests/test_ufunclike.py
index 5604b3744..361367b97 100644
--- a/numpy/lib/tests/test_ufunclike.py
+++ b/numpy/lib/tests/test_ufunclike.py
@@ -52,7 +52,8 @@ class TestUfunclike(object):
return res
def __array_wrap__(self, obj, context=None):
- obj.metadata = self.metadata
+ if isinstance(obj, MyArray):
+ obj.metadata = self.metadata
return obj
def __array_finalize__(self, obj):