summaryrefslogtreecommitdiff
path: root/numpy/ma/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r--numpy/ma/core.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 87082d139..b9f7da092 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -1495,9 +1495,10 @@ def make_mask(m, copy=False, shrink=True, dtype=MaskType):
shrink : bool, optional
Whether to shrink `m` to ``nomask`` if all its values are False.
dtype : dtype, optional
- Data-type of the output mask. By default, the output mask has
- a dtype of MaskType (bool). If the dtype is flexible, each field
- has a boolean dtype.
+ Data-type of the output mask. By default, the output mask has a
+ dtype of MaskType (bool). If the dtype is flexible, each field has
+ a boolean dtype. This is ignored when `m` is ``nomask``, in which
+ case ``nomask`` is always returned.
Returns
-------
@@ -1547,7 +1548,7 @@ def make_mask(m, copy=False, shrink=True, dtype=MaskType):
dtype=[('man', '|b1'), ('mouse', '|b1')])
"""
- if m is nomask and shrink:
+ if m is nomask:
return nomask
elif isinstance(m, ndarray):
# We won't return after this point to make sure we can shrink the mask