xray.DataArray.any

DataArray.any(dimension=None, axis=None, **kwargs)

Reduce this DataArray’s data’ by applying numpy.any along some dimension(s).

Parameters:

dimension : str or sequence of str, optional

Dimension(s) over which to apply numpy.any.

axis : int or sequence of int, optional

Axis(es) over which to apply numpy.any. Only one of the ‘dimension’ and ‘axis’ arguments can be supplied. If neither are supplied, then numpy.any is calculated over the flattened array (by calling numpy.any(x) without an axis argument).

**kwargs : dict

Additional keyword arguments passed on to numpy.any.

Returns:

reduced : DataArray

New DataArray object with numpy.any applied to its data and the indicated dimension(s) removed.