uwacan.positional.Sensor.where#
- Sensor.where(cond, other=<NA>, drop=False)#
Filter elements from this object according to a condition.
This method returns elements where the
condis True, otherwise filling withother. Seexarray.Dataset.wherefor more details.- Parameters:
- condDataArray, Dataset, or callable
Locations at which to preserve this object’s values. dtype must be
bool. If a callable, the callable is passed this object, and the result is used as the value for cond.- otherscalar, DataArray, Dataset, or callable, optional
Value to use for locations in this object where
condis False. By default, these locations are filled with NA. If a callable, it must expect this object as its only parameter.- dropbool, default: False
If True, coordinate labels that only correspond to False values of the condition are dropped from the result.
- Returns:
- type(self)
An object wrapped using the same wrapper as the called object.