fftarray.Array.sel#
- Array.sel(indexers: Mapping[str, float | slice] | None = None, missing_dims: Literal['raise', 'warn', 'ignore'] = 'raise', method: Literal['nearest', 'pad', 'ffill', 'backfill', 'bfill'] | None = None, **indexers_kwargs: float | slice) Array [source]#
Select specific values along respective dimension names by label/coordinate. Inspired by xarray.DataArray.sel
- Parameters:
indexers (Optional[Mapping[str, Union[float, slice]]], optional) – Mappping from Dimension name to the coordinate/label which can be a float or a slice, by default None
missing_dims (Literal['raise', 'warn', 'ignore']) – Behavior, if selected Dimensions are not part of the Array, by default ‘raise’
method (Literal['nearest', 'pad', 'ffill', 'backfill', 'bfill'] | None) –
Method to use for inexact matches
None (default): only exact matches
pad / ffill: propagate last valid index value forward
backfill / bfill: propagate next valid index value backward
nearest: use nearest valid index value
- Returns:
Indexed Array.
- Return type:
Notes
In comparison to its xarray implementation, there is an add-on:
Implements missing_dims arg and accordingly raises errors