xugrid.Ugrid1d.isel#

Ugrid1d.isel(indexers=None, return_index=False, **indexers_kwargs)[source]#

Select based on node or edge.

Edge selection always results in a valid UGRID topology. Node selection may result in invalid topologies (incomplete edges), and will error in such a case.

Parameters:
  • indexers (dict of str to np.ndarray of integers or bools)

  • return_index (bool, optional) – Whether to return node_index, edge_index.

Returns:

  • obj (xr.Dataset or xr.DataArray)

  • grid (Ugrid2d)

  • indexes (dict) – Dictionary with keys node dimension, edge dimension and values their respective index. Only returned if return_index is True.