From 5bce29536aa3b0238a728c3fd46c8edc73d3a84f Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Thu, 30 Mar 2006 21:26:09 +0000 Subject: Fix-up _wrapit --- numpy/core/oldnumeric.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'numpy/core/oldnumeric.py') diff --git a/numpy/core/oldnumeric.py b/numpy/core/oldnumeric.py index e9d1835ac..978104469 100644 --- a/numpy/core/oldnumeric.py +++ b/numpy/core/oldnumeric.py @@ -167,6 +167,8 @@ def _wrapit(obj, method, *args, **kwds): wrap = None result = getattr(asarray(obj),method)(*args, **kwds) if wrap: + if not isinstance(result, mu.ndarray): + result = asarray(result) result = wrap(result) return result -- cgit v1.2.1