PlasmaCalcs.tools.xarray_tools.xarray_coords.xarray_nondim_coords
- PlasmaCalcs.tools.xarray_tools.xarray_coords.xarray_nondim_coords(array, *, scalars_only=False, item=False, _sort=True)
- returns dict of {coord name: coord.values} for all non-dimension coords (not in array.dims).
- scalars_only: bool
- whether to only include coords with ndim==0.
- item: bool
- whether to use coord.item() for scalars.
- _sort: bool
- whether to sort, if any ‘{coord}_index’ coords appear consecutively,(when doing the default array.coords.items() order), sort those alphabetically.If their non-index counterparts also appear consecutively, sort those too.E.g. order: ‘C’, ‘A’, ‘B’, ‘other_index’, ‘D’, ‘C_index’, ‘A_index’, ‘D_index’, ‘B_index’, ‘E’,becomes: ‘A’, ‘B’, ‘C’, ‘other_index’, ‘D’, ‘A_index’, ‘B_index’, ‘C_index’, ‘D_index’, ‘E’.