pisces.geometry.grids.base.Grid.get_axis_coordinate_array#

Grid.get_axis_coordinate_array(axis: int | str, slc: slice) unyt_array[source]#

Return the coordinate values along a single axis for a given slice.

Parameters:
  • axis (int or str) – The index or name of the axis to extract coordinates for.

  • slc (slice) – A slice object specifying the indices along the axis to extract.

Returns:

1D array of coordinate values for the selected slice along the axis.

Return type:

unyt.array.unyt_array