From 827b79a954d3f222bb1f618fd0a14e606dbd7e6e Mon Sep 17 00:00:00 2001 From: Tim Hochberg Date: Fri, 31 Mar 2006 16:28:24 +0000 Subject: Fixed _wrapit so that it correctly handled non-array return values. --- numpy/core/oldnumeric.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/oldnumeric.py') 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) -- cgit v1.2.1