pisces.geometry.grids.base.Grid.get_meshgrid_slice#

Grid.get_meshgrid_slice(*slcs: slice, axes: Sequence[str] | None = None, indexing: str = 'ij') tuple[unyt_array, ...][source]#

Return a meshgrid of coordinates for a sliced region of the grid.

Parameters:
  • slcs (slice(s)) – One slice per axis in the specified axes. The number of slices must match the number of axes.

  • axes (sequence of str, optional) – Axes for which to build the meshgrid. If not provided, all active axes are used.

  • indexing ({"ij", "xy"}, default "ij") – Indexing convention for meshgrid construction.

Returns:

A tuple of N-dimensional arrays forming the meshgrid of coordinates, one array for each axis in the full coordinate system.

Return type:

tuple of unyt_array