pub fn matrix_from_flat<E>(
rows: usize,
cols: usize,
elements: impl IntoIterator<Item = E>,
) -> Result<Expr, ExprShapeError>Expand description
Constructs a row-major matrix from a flat sequence.
ยงErrors
Returns ExprShapeError when either dimension is zero, the dimension
product overflows, the element count differs from rows * cols, or an
element is not scalar-valued.