_rearrange¶
- xarray_einstats.einops._rearrange(da, out_dims, in_dims=None, dim_lengths=None)[source]¶
Wrap einops.rearrange.
This is the function that actually interfaces with
einops
.xarray_einstats.einops.rearrange
is the user facing version as it exposes two possible APIs, one of them significantly less verbose and more friendly (but much less flexible).- Parameters:
- da
xarray.DataArray
Input DataArray to be rearranged
- out_dims
list
ofstr
,list
ordict
See docstring of
rearrange
- in_dims
list
ofstr
ordict
, optional See docstring of
rearrange
- dim_lengths
dict
, optional kwargs with key equal to dimension names in
out_dims
(that is, strings or dict keys) are passed to einops.rearrange the rest of keys are passed toxarray.apply_ufunc
- da