redistribute#

caput.containers.Container.redistribute(dist_axis: int | str | collections.abc.Sequence[int | str]) None[source]#

Redistribute parallel datasets along a specified axis.

Walks the tree of datasets and redistributes any distributed datasets found with the specified axis. The underlying dataset objects remain the same, but the underlying data arrays are new.

Parameters:
dist_axisint | str | Sequence[int | str]

The axis can be specified by an integer index (positive or negative), or by a string label which must correspond to an entry in the axis attribute on the dataset. If a list is supplied, each entry is tried in turn, which allows different datasets to be redistributed along differently labelled axes.