numpy.ma.MaskedArray.count

MaskedArray.count(axis=None)

Count the non-masked elements of the array along the given axis.

Parameters:

axis : int, optional

Axis along which to count the non-masked elements. If axis is None, all the non masked elements are counted.

Returns:

result : MaskedArray

A masked array where the mask is True where all data are masked. If axis is None, returns either a scalar ot the masked singleton if all values are masked.

Previous topic

numpy.ma.MaskedArray.any

Next topic

numpy.ma.MaskedArray.nonzero

This Page

Quick search