xdas.count_nonzero#
- xdas.count_nonzero(da, dim=None, **kwargs)[source]#
Count the number of non-zero values along the specified dimension.
- Parameters:
- Returns:
Number of non-zero values along the specified dimension. If dim is None, a single integer value is returned; if dim is specified, the result has the same shape as the input data.
- Return type: