diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-09-04 23:23:40 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-09-04 23:23:40 +0000 |
commit | 9ae4fd02510b4aef8423896edca66ffd5412f3a8 (patch) | |
tree | 2b9637b7ff9fcd0f1ca2076792d5f3aa0645e61d /numpy/core/ma.py | |
parent | 9c736b3941cf35d395524b0416deb4a462ef4a9b (diff) | |
download | numpy-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.py | 6 |
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: |