pub fn asarray<T: Element, D: Dimension>(
dim: D,
data: Vec<T>,
) -> FerrayResult<Array<T, D>>Expand description
Interpret existing data as an array without copying (if possible).
This is equivalent to numpy.asarray(). Since Rust ownership rules
require moving the data, this creates an owned array from the vector.
§Errors
Returns FerrayError::ShapeMismatch if lengths don’t match.