uxarray.Grid.isel

Contents

uxarray.Grid.isel#

Grid.isel(inverse_indices=False, **dim_kwargs)#

Indexes an unstructured grid along a given dimension (n_node, n_edge, or n_face) and returns a new grid.

The indexing method is inclusive: for cases where node or edge indices are provided, the result is formed by the subset of all faces which contain any of the indicated nodes or edges (together with all nodes and edges which are present on any of those faces), which means that the result may include additional elements beyond those explicitly requested.

Parameters:
  • inverse_indices (list[str] | set[str] | bool, default=False) – Indicates whether to store the original grids indices. Passing True stores the original face indices, other reverse indices can be stored by passing any or all of the following: ([“face”, “edge”, “node”], True)

  • **dims_kwargs (kwargs) – Dimension to index, one of [‘n_node’, ‘n_edge’, ‘n_face’]

Example

>> grid = ux.open_grid(grid_path) >> grid.isel(n_face = [1,2,3,4])