Function flatten

Source
pub fn flatten(
    matrix: AbstractLiteral<Literal>,
) -> impl Iterator<Item = Literal>
Expand description

Flattens a multi-dimensional matrix literal into a one-dimensional slice of its elements.

The elements of the matrix are returned in row-major ordering (see enumerate_indices).

ยงPanics

  • If the number or type of elements in each dimension is inconsistent.

  • If matrix is not a matrix.