pub fn undo_swizzle_reshape<T: Copy, S: Data<Elem = T>>(
encoded: ArrayBase<S, IxDyn>,
axes: &[AxisGroup],
) -> Result<Array<T, IxDyn>, SwizzleReshapeCodecError>
Expand description
Reverts the swizzle and reshape of the encoded
array with the axes
and
returns the original array.
Since the shape of the original array is not known, only permutations of axes are supported.
ยงErrors
Errors with
SwizzleReshapeCodecError::CannotDecodeMergedAxes
if any axes were merged and thus cannot be split without further informationSwizzleReshapeCodecError::InvalidAxisIndex
if any axis is out of boundsSwizzleReshapeCodecError::InvalidAxisPermutation
if theaxes
permutation does not contain every axis index exactly onceSwizzleReshapeCodecError::MultipleRestAxes
if theaxes
permutation contains more than oneRest
-axes marker