xarray.IndexVariable.isel

IndexVariable.isel(indexers: Mapping[Hashable, Any] = None, **indexers_kwargs) → VariableType

Return a new array indexed along the specified dimension(s).

Parameters:**indexers ({dim: indexer, ..}) – Keyword arguments with names matching dimensions and values given by integers, slice objects or arrays.
Returns:obj – A new Array with the selected data and dimensions. In general, the new variable’s data will be a view of this variable’s data, unless numpy fancy indexing was triggered by using an array indexer, in which case the data will be a copy.
Return type:Array object