On this page
numpy.ma.all
- ma.all(self, axis=None, out=None, keepdims=<no value>)=<numpy.ma.core._frommethod object>
-
Returns True if all elements evaluate to True.
The output array is masked where all the values along the given axis are masked: if the output would have been a scalar and that all the values are masked, then the output is
masked.Refer to
numpy.allfor full documentation.See also
-
numpy.ndarray.all -
corresponding function for ndarrays
-
numpy.all -
equivalent function
Examples
>>> np.ma.array([1,2,3]).all() True >>> a = np.ma.array([1,2,3], mask=True) >>> (a.all() is np.ma.masked) True -
© 2005–2022 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.23/reference/generated/numpy.ma.all.html