PlasmaCalcs.tools.xarray_tools.xarray_indexing.xarray_cmax
- PlasmaCalcs.tools.xarray_tools.xarray_indexing.xarray_cmax(array, coord, *, promote_dims_if_needed=True)
- return (array of) coord value(s) at array.argmax(dim=dim associated with coord).coord must be a dimension, or associated with a single 1D dimension.
- array: xarray.DataArray
- array to find max value in.
- coord: str
- coord along which to find max.
- promote_dims_if_needed: bool
- whether to promote non-dimension coords to dimensions.if False, raise DimensionKeyError if any relevant coord is not already a dimension.