summaryrefslogtreecommitdiff
path: root/numpy/lib/shape_base.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-10-07 02:23:35 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-10-07 02:23:35 +0000
commitc75bd2d03ccc6415bb9a0f090d7e2d80b40ea2af (patch)
treec57fc526b0ce6de11ef001c7de0be794c1045a83 /numpy/lib/shape_base.py
parent1ff0cd9948e79eecd2c8ec9ac9aa88c81c6b9dfc (diff)
downloadnumpy-c75bd2d03ccc6415bb9a0f090d7e2d80b40ea2af.tar.gz
Add tests for tile and fix error.
Diffstat (limited to 'numpy/lib/shape_base.py')
-rw-r--r--numpy/lib/shape_base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py
index 16fd9d6b9..8f2a3014c 100644
--- a/numpy/lib/shape_base.py
+++ b/numpy/lib/shape_base.py
@@ -604,8 +604,8 @@ def tile(A, reps):
c = _nx.array(A,copy=False,subok=True,ndmin=d)
shape = list(c.shape)
n = c.size
- if (d < A.ndim):
- tup = (1,)*(A.ndim-d) + tup
+ if (d < c.ndim):
+ tup = (1,)*(c.ndim-d) + tup
for i, nrep in enumerate(tup):
if nrep!=1:
c = c.reshape(-1,n).repeat(nrep,0)