diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-02-15 16:38:43 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2014-02-15 16:38:43 -0700 |
commit | 2868dc4a0513f58eafc013f3ba3d84ae07113199 (patch) | |
tree | 04649bc8cda222eeb06a893070e2b3e9699758a8 /numpy/ma/extras.py | |
parent | e246cc79de16d54ce9b127d5faf625adb6da5f0b (diff) | |
parent | ab04e1ae0e8eca717bc7e42f3b0a60c9ff764289 (diff) | |
download | numpy-2868dc4a0513f58eafc013f3ba3d84ae07113199.tar.gz |
Merge pull request #4105 from seberg/deprecate-boolean-math
DEP: Deprecate boolean math operations
Diffstat (limited to 'numpy/ma/extras.py')
-rw-r--r-- | numpy/ma/extras.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py index 058bde710..c2d105584 100644 --- a/numpy/ma/extras.py +++ b/numpy/ma/extras.py @@ -540,7 +540,7 @@ def average(a, axis=None, weights=None, returned=False): else: if weights is None: n = add.reduce(a, axis) - d = umath.add.reduce((-mask), axis=axis, dtype=float) + d = umath.add.reduce((~mask), axis=axis, dtype=float) else: w = filled(weights, 0.0) wsh = w.shape @@ -1735,7 +1735,7 @@ def _ezclump(mask): #def clump_masked(a): if mask.ndim > 1: mask = mask.ravel() - idx = (mask[1:] - mask[:-1]).nonzero() + idx = (mask[1:] ^ mask[:-1]).nonzero() idx = idx[0] + 1 slices = [slice(left, right) for (left, right) in zip(itertools.chain([0], idx), |