PlasmaCalcs.tools.xarray_tools.xarray_dimensions.take_along_dimensions
- PlasmaCalcs.tools.xarray_tools.xarray_dimensions.take_along_dimensions(array, dimensions, **kw_isel)
- returns result of taking array along each of these dimensions, in order.result will be a numpy array with dtype=object, shape=(d0, d1, …),where di = len(array.coords[dimensions[i]]).each element of result will be an xarray.DataArray.any dimension can be None –> result shape will be 1 at that dimension, and nothing will be taken.E.g. take_along_dimensions(array, [None, ‘fluid’]) gives array of shape (1, len(fluids)).