Skip to main content

unflatten_arrays

Function unflatten_arrays 

Source
pub fn unflatten_arrays<B: Backend, T: Element, X: Tree<B>>(
    like: &X,
    arrays: Vec<Array<B, T>>,
) -> X
Expand description

Builds a pytree with the structure of like from arrays, one per leaf (the inverse of leaves_as).

ยงPanics

Panics if the number of arrays differs from the number of leaves.