diff options
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: |