summaryrefslogtreecommitdiff
path: root/numpy/core/ma.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-09-04 23:23:40 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-09-04 23:23:40 +0000
commit9ae4fd02510b4aef8423896edca66ffd5412f3a8 (patch)
tree2b9637b7ff9fcd0f1ca2076792d5f3aa0645e61d /numpy/core/ma.py
parent9c736b3941cf35d395524b0416deb4a462ef4a9b (diff)
downloadnumpy-9ae4fd02510b4aef8423896edca66ffd5412f3a8.tar.gz
Fix ticket #271 and turn default printing of warnings off
Diffstat (limited to 'numpy/core/ma.py')
-rw-r--r--numpy/core/ma.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/core/ma.py b/numpy/core/ma.py
index 35f8ee120..18a4e9a8a 100644
--- a/numpy/core/ma.py
+++ b/numpy/core/ma.py
@@ -1543,7 +1543,11 @@ def repeat(a, repeats, axis=None):
"""
af = filled(a)
if isinstance(repeats, types.IntType):
- repeats = tuple([repeats]*(shape(af)[axis]))
+ if axis is None:
+ num = af.size
+ else:
+ num = af.shape[axis]
+ repeats = tuple([repeats]*num)
m = getmask(a)
if m is not nomask: