pub fn reinterpret_array_into<'a, T: Copy, U: ArrayDType, D: Dimension>(
encoded: ArrayView<'_, T, D>,
reinterpret: impl Fn(T) -> U,
decoded: AnyArrayViewMut<'a>,
) -> Result<(), ReinterpretCodecError>
Expand description
Reinterpret the data elements of the encoded
array using the provided
reinterpret
closure into the decoded
array.
§Errors
Errors with
ReinterpretCodecError::MismatchedDecodeIntoArray
ifdecoded
does not contain an array with elements of typeU
or its shape does not match theencoded
array’s shape