pub fn extract_matrix(v: &Value) -> Result<(Vec<f64>, usize, usize), String>Expand description
Extracts a 2D matrix from a Value, returning flat row-major data and
dimensions (data, nrows, ncols).
A Scalar is promoted to a 1×1 matrix. Any other type returns an error.