not_single_element_dims
- not_single_element_dims(data_array: xr.DataArray) list[Hashable] [source]
Names of dimensions in
data
which don’t have a size equal to one.This helper function is for example used to determine if a data only have a single trace, since this requires different plotting code (e.g.
data_array.plot.line(x="time")
).- Parameters:
data_array (xr.DataArray) – DataArray to check if it has only a single dimension.
- Returns:
Names of dimensions in
data
which don’t have a size equal to one.- Return type:
list[Hashable]