numpy.ma.mask_or
-
numpy.ma.mask_or(m1, m2, copy=False, shrink=True)
[source] -
Combine two masks with the
logical_or
operator.The result may be a view on
m1
orm2
if the other isnomask
(i.e. False).- Parameters
- Returns
-
-
maskoutput mask
-
The result masks values that are masked in either
m1
orm2
.
-
- Raises
-
- ValueError
-
If
m1
andm2
have different flexible dtypes.
Examples
>>> m1 = np.ma.make_mask([0, 1, 1, 0]) >>> m2 = np.ma.make_mask([1, 0, 0, 0]) >>> np.ma.mask_or(m1, m2) array([ True, True, True, False])
© 2005–2020 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.19/reference/generated/numpy.ma.mask_or.html