summaryrefslogtreecommitdiff
path: root/numpy/core/oldnumeric.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/oldnumeric.py')
-rw-r--r--numpy/core/oldnumeric.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/oldnumeric.py b/numpy/core/oldnumeric.py
index 978104469..b8685d69e 100644
--- a/numpy/core/oldnumeric.py
+++ b/numpy/core/oldnumeric.py
@@ -166,7 +166,7 @@ def _wrapit(obj, method, *args, **kwds):
except AttributeError:
wrap = None
result = getattr(asarray(obj),method)(*args, **kwds)
- if wrap:
+ if wrap and isinstance(result, mu.ndarray):
if not isinstance(result, mu.ndarray):
result = asarray(result)
result = wrap(result)