Skip to main content

extract_vector

Function extract_vector 

Source
pub fn extract_vector(v: &Value) -> Result<Vec<f64>, String>
Expand description

Extracts a flat Vec<f64> from a scalar or vector Value.

A Scalar is promoted to a one-element vector. A Matrix is accepted only when it is a row or column vector (one dimension equals 1).