diff options
author | pierregm <pierregm@localhost> | 2010-09-13 15:43:27 +0000 |
---|---|---|
committer | pierregm <pierregm@localhost> | 2010-09-13 15:43:27 +0000 |
commit | 96afea0b32c77fa60112a1a78d66af77912e2523 (patch) | |
tree | e8dadd935c387ee5d07b200ae9adc7be4de50336 /numpy/ma/core.py | |
parent | 7213c5d804412b1ab6f23c6419ba836865af517a (diff) | |
download | numpy-96afea0b32c77fa60112a1a78d66af77912e2523.tar.gz |
* ma.core._print_templates: switched the keys 'short' and 'long' to 'short_std' and 'long_std' respectively (bug #1586)
* Fixed incorrect broadcasting in ma.power (bug #1606)
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r-- | numpy/ma/core.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index de7485638..a945789df 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -2296,14 +2296,14 @@ def _recursive_printoption(result, mask, printopt): np.putmask(curdata, curmask, printopt) return -_print_templates = dict(long="""\ +_print_templates = dict(long_std="""\ masked_%(name)s(data = %(data)s, %(nlen)s mask = %(mask)s, %(nlen)s fill_value = %(fill)s) """, - short="""\ + short_std="""\ masked_%(name)s(data = %(data)s, %(nlen)s mask = %(mask)s, %(nlen)s fill_value = %(fill)s) @@ -3574,8 +3574,8 @@ class MaskedArray(ndarray): return _print_templates['short_flx'] % parameters return _print_templates['long_flx'] % parameters elif n <= 1: - return _print_templates['short'] % parameters - return _print_templates['long'] % parameters + return _print_templates['short_std'] % parameters + return _print_templates['long_std'] % parameters def __eq__(self, other): @@ -5972,7 +5972,7 @@ harden_mask = _frommethod('harden_mask') ids = _frommethod('ids') maximum = _maximum_operation() mean = _frommethod('mean') -minimum = _minimum_operation () +minimum = _minimum_operation() nonzero = _frommethod('nonzero') prod = _frommethod('prod') product = _frommethod('prod') @@ -6040,8 +6040,7 @@ def power(a, b, third=None): if m is not nomask: if not (result.ndim): return masked - m |= invalid - result._mask = m + result._mask = np.logical_or(m, invalid) # Fix the invalid parts if invalid.any(): if not result.ndim: |