xdas.DataArray.isel#

DataArray.isel(indexers=None, drop=False, **indexers_kwargs)[source]#

Return a new DataArray selecting indexes along the specified dimension(s).

Parameters:
  • indexers (dict, optional) – A dict with keys matching dimensions and values given by integers, slice objects or arrays.

  • drop (bool, optional) – If drop=True, drop coordinates variables in indexers instead of making them scalar.

  • **indexers_kwargs (dict, optional) – The keyword arguments form of integers. Overwrite indexers input if both are provided.

Returns:

The selected subset of the DataArray.

Return type:

DataArray