pub fn array<T: Element, D: Dimension>(
dim: D,
data: Vec<T>,
) -> FerrayResult<Array<T, D>>Expand description
Create an array from a flat vector and a shape (C-order).
This is the primary “array constructor” — analogous to numpy.array() when
given a flat sequence plus a shape.
§Errors
Returns FerrayError::ShapeMismatch if data.len() does not equal the
product of the shape dimensions.