diff options
author | pierregm <pierregm@localhost> | 2009-07-18 20:03:02 +0000 |
---|---|---|
committer | pierregm <pierregm@localhost> | 2009-07-18 20:03:02 +0000 |
commit | a44e1438cc156d24bfdaa80f5007bc16f6e88418 (patch) | |
tree | 60b6661d8202b9538376bec69f2df03edd14104f /numpy/ma/core.py | |
parent | 4beb657e521ceeb7645dfb84f531c55b8032fa39 (diff) | |
download | numpy-a44e1438cc156d24bfdaa80f5007bc16f6e88418.tar.gz |
core : fixed MaskedArray.__array_finalize__ when the mask is full of False (bugfix #1166)
extras : introduced clump_masked and clump_unmasked
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r-- | numpy/ma/core.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 105dd30ec..4b4fdc2b9 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -2513,7 +2513,10 @@ class MaskedArray(ndarray): self._mask = _mask # Finalize the mask ........... if self._mask is not nomask: - self._mask.shape = self.shape + try: + self._mask.shape = self.shape + except ValueError: + self._mask = nomask return #.................................. def __array_wrap__(self, obj, context=None): |