decode.select module#
- by(dems: DataArray, coord_name: str, /, include: Sequence[T] | T | None = None, *, exclude: Sequence[T] | T | None = None, min: T | None = None, max: T | None = None, sort: bool = False, as_dim: bool = False) DataArray [source]#
Select DEMS by values of a coordinate.
- Parameters:
dems (DataArray) – DEMS DataArray to be selected.
coord_name (str) – Name of the coordinate for the selection.
include (Sequence[T] | T | None) – Coordinate values to be included. If not specified, all values are included.
exclude (Sequence[T] | T | None) – Coordinate values to be excluded. If not specified, any values are not excluded.
min (T | None) – Minimum selection bound (inclusive). If not specified, no bound is set.
max (T | None) – Maximum selection bound (exclusive). If not specified, no bound is set.
sort (bool) – Whether to sort by the coordinate after selection.
as_dim (bool) – Whether to use the coordinate as a dimension.
- Returns:
Selected DEMS.
- Return type:
DataArray