npy-writer
This is a small Rust package for writing the NumPy file formats .npy and .npz. This package supports writing the following data types:
- Single floating points or integers
- Vectors of single floating points or integers
- N-dimensional arrays of single floating points or integers (via the
ndarrayfeature) npzfiles mapping string keys to any of the data types above (via thezipfeature)
Usage
Example of writing a .npy file with integers:
use NumpyWriter;
use File;
let mut f = create.unwrap;
vec!.write_npy.unwrap;
With the feature ndarray, you can write N-dimensional arrays like so:
let mut arr = zeros;
arr.write_npy.unwrap;