summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/add_newdocs.py2
-rw-r--r--numpy/core/oldnumeric.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index 156f4f698..2e91bea7c 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -1,7 +1,7 @@
from lib import add_newdoc
-add_newdoc('numpy.core','dtypedescr',
+add_newdoc('numpy.core','dtype',
[('fields', "Fields of the data-typedescr if any."),
('alignment', "Needed alignment for this data-type"),
('byteorder',
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