pub fn reshape_shape(shape: &Shape, limit: Limit) -> ReshapedShape
Expand description
Reshapes a labeled Shape
by factoring large extents into
smaller ones, producing a new shape with expanded dimensionality
and updated labels.
This uses reshape_with_limit
on the underlying slice and expand_labels
to generate labels for each factored dimension.
§Arguments
shape
: the labeled shape to reshapelimit
: maximum extent allowed per factored dimension
§Returns
A new ReshapedShape
with an updated Shape
and dimension
factoring metadata.
§Panics
Panics if constructing the new Shape
fails. This should not
occur unless the reshaped slice and labels are inconsistent (a
programming logic error).