Previous topic

numpy.ma.zeros

Next topic

numpy.ma.any

This is documentation for an old release of NumPy (version 1.13). Read this page in the documentation of the latest stable release (version 2.2).

numpy.ma.all

numpy.ma.all(self, axis=None, out=None, keepdims=<class numpy._globals._NoValue at 0x40b9ccec>) = <numpy.ma.core._frommethod instance>

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.all for full documentation.

See also

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