From 0c058e7db288f05e3e4af56ed345f350046d01f4 Mon Sep 17 00:00:00 2001 From: rgommers Date: Sun, 8 Aug 2010 07:32:32 +0000 Subject: ENH: Make atleast_3d respect ndarray subclasses. Closes #1560. --- numpy/core/shape_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy') diff --git a/numpy/core/shape_base.py b/numpy/core/shape_base.py index c86684c6f..4c84cf397 100644 --- a/numpy/core/shape_base.py +++ b/numpy/core/shape_base.py @@ -1,7 +1,7 @@ __all__ = ['atleast_1d','atleast_2d','atleast_3d','vstack','hstack'] import numeric as _nx -from numeric import array, asarray, newaxis +from numeric import array, asanyarray, newaxis def atleast_1d(*arys): """ @@ -146,7 +146,7 @@ def atleast_3d(*arys): """ res = [] for ary in arys: - ary = asarray(ary) + ary = asanyarray(ary) if len(ary.shape) == 0: result = ary.reshape(1,1,1) elif len(ary.shape) == 1: -- cgit v1.2.1