numpy.ma.all#

ma.all(self,axis=None,out=None,keepdims=<novalue>)=<numpy.ma.core._frommethodobject>#

Returns True if all elements evaluate to True.

The output array is masked where all the values along the given axisare masked: if the output would have been a scalar and that all thevalues are masked, then the output ismasked.

Refer tonumpy.all for full documentation.

See also

numpy.ndarray.all

corresponding function for ndarrays

numpy.all

equivalent function

Examples

>>>importnumpyasnp>>>np.ma.array([1,2,3]).all()True>>>a=np.ma.array([1,2,3],mask=True)>>>(a.all()isnp.ma.masked)True
On this page