summaryrefslogtreecommitdiff
path: root/numpy/core/shape_base.py
diff options
context:
space:
mode:
authorrgommers <ralf.gommers@googlemail.com>2010-08-08 07:32:32 +0000
committerrgommers <ralf.gommers@googlemail.com>2010-08-08 07:32:32 +0000
commit0c058e7db288f05e3e4af56ed345f350046d01f4 (patch)
tree31397848814592164cb164e78ff6ad967c52994b /numpy/core/shape_base.py
parentc2f9eae4bcdb1137a2b949e58f073b706f866411 (diff)
downloadnumpy-0c058e7db288f05e3e4af56ed345f350046d01f4.tar.gz
ENH: Make atleast_3d respect ndarray subclasses. Closes #1560.
Diffstat (limited to 'numpy/core/shape_base.py')
-rw-r--r--numpy/core/shape_base.py4
1 files changed, 2 insertions, 2 deletions
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: