This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / ma / core / all

function

numpy.ma.core:all

source: build-install/usr/lib/python3.14/site-packages/numpy/ma/core.py :7063

Summary

Returns True if all elements evaluate to True.

Extended Summary

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.

Examples

import numpy as np
np.ma.array([1,2,3]).all()
a = np.ma.array([1,2,3], mask=True)
(a.all() is np.ma.masked)

See also

numpy.all

equivalent function

numpy.ndarray.all

corresponding function for ndarrays

Aliases

  • numpy.ma.all