I am trying to understand the "v" in ndarray (de)serialize:
use ndarray::prelude::*;
pub fn example() {
let ar2 = arr2(&[[0., 0., 0., 0., 0.], [0., 0., 0., 0., 0.], [0., 0., 0., 0., 0.],[0., 0., 0., 0., 0.],[0., 0., 0., 0., 0.]]);
let s = serde_json::to_string(&ar2).unwrap();
dbg!(s);
let ar1 = arr1(&[[0., 0., 0., 0., 0.], [0., 0., 0., 0., 0.], [0., 0., 0., 0., 0.],[0., 0., 0., 0., 0.],[0., 0., 0., 0., 0.]]);
let s = serde_json::to_string(&ar1).unwrap();
dbg!(s);
let anatoly = String::from("{\"v\":1,\"dim\":[3,3],\"data\":[1.0,1.0,0.0,0.0,0.0,1.0,1.0,1.0,1.0]}");
let a = serde_json::from_str::<Array2<f64>>(&anatoly).unwrap();
dbg!(a);
}
Looking at: https://docs.rs/ndarray/latest/src/ndarray/array_serde.rs.html#91-100 It refers to some kind of ARRAY_FORMAT_VERSION
What is this "version"?
Is it always "1" (for latest versions of the lib)?