Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let a = Array::from_vec(vec![0.1, 0.2]);
- let mut w = BufWriter::new(File::create("/tmp/foo.bar").unwrap());
- serialize_into(&mut w, &a).unwrap();
- let f = File::open("/tmp/foo.bar").unwrap();
- let mut rdr = BufReader::new(f);
- let decoded_a: ndarray::Array1<f32> = deserialize_from(&mut rdr).unwrap();
- // thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Custom { kind: UnexpectedEof, error: StringError("failed to fill whole buffer") })', src/libcore/result.rs:997:5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement