ndarray-npy
This crate provides support for reading/writing ndarray's ArrayBase type
from/to .npy and .npz files. See the
documentation for more information.
This crate is a work-in-progress. It currently supports only a subset of
.npy header descriptors and supports only primitive numeric types as the
array element type. You can implement ReadableElement and WritableElement
for your own types, but the next breaking release of this library will probably
change those traits.
Future plans include support for:
- Memory-mapped files.
- More element types (e.g. structs). If you need support for structs before
this is implemented in
ndarray-npy, check out thenpycrate. - Possibly merging this with the
npycrate.
Using with Cargo
To use with the default features:
[]
= "0.1"
To use without the default features:
[]
= { = "0.1", = false }
There are two optional features that are enabled by default:
npzenables support for.npzfiles, which requires a dependency on thezipcrate.compressed_npzenables support for compressed.npzfiles, which requires a dependency on thezipcrate and also pulls in the necessary dependencies for thezipcrate'sdeflatefeature.
For example, you can use just the npz feature:
[]
= "0.1"
= false
= ["npz"]
Releases
-
0.1.1
- Improved crate documentation (no functional changes).
-
0.1.0
- Initial release.
Contributing
Please feel free to create issues and submit PRs. PRs adding more tests would be especially appreciated.
License
Copyright 2018 Jim Turner
Licensed under the Apache License, Version 2.0 or the MIT license, at your option. You may not use this project except in compliance with those terms.