Skip to content

Instantly share code, notes, and snippets.

@Steboss89
Created June 30, 2021 14:53
Show Gist options
  • Save Steboss89/f0413ee340a19f2f58f7f5a883d2da20 to your computer and use it in GitHub Desktop.
Save Steboss89/f0413ee340a19f2f58f7f5a883d2da20 to your computer and use it in GitHub Desktop.
Convert an array to a vector
let target_array = target.unwrap().to_ndarray::<Float64Type>().unwrap();
// create a vec type and populate with y values
let mut y: Vec<f64> = Vec::new();
for val in target_array.iter(){
y.push(*val);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment