PackageTrack
Sign in Get early access

ndarray-npy

.npy and .npz file format support for ndarray

0.10.0 11M downloads/mo #2954 most downloaded on crates.io jturner314/ndarray-npy

What this package is like to depend on

Last release 8 months ago

15 Dec 2025

Release timing varies

gaps range from 2 months to 2.9 years

Nearly every release is documented

notes for 15 of 15 stable releases

Nothing withdrawn

no release was ever pulled

8 years old

15 releases · first in 2018

1 release in the last 12 months

see the full history below

Release timeline

15 releases · Apr 2018 to Dec 2025
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 15
  1. 0.10.0 15 Dec 2025
    Release notes

    Breaking Changes

    • Updated to ndarray 0.17.1.
    • Updated to zip 6.
    • Updated minimum Rust version to 1.84.
    • Changed the array parameter of NpzWriter::add_array from &ArrayBase<S, D> to T: WriteNpyExt + ?Sized to support the new ArrayRef type in ndarray 0.17.1.

    New Features

    • Added new create_new_npy convenience function which uses File::create_new. (In contrast, the existing write_npy function uses File::create.)
    • Added NpzWriter::add_array_with_options, which overrides the options for that specific array.
    • Publicly exposed the npy module to provide access to header-related functionality in the npy::header module. In most cases, users do not need this functionality, but some users have requested access to it for specific use cases.
    • Implemented WriteNpyExt for the new ArrayRef type in ndarray 0.17.1.
    • Removed the implicit Sized bound from write_npy to support the new ArrayRef type in ndarray 0.17.1.
    Open source →
  2. 0.9.1 14 Sep 2024
    Release notes
    • Removed broken links from docs.
    Open source →
  3. 0.9.0 14 Sep 2024
    Release notes

    Breaking Changes

    • Updated to ndarray 0.16.
    • Updated to zip 2.
    • Updated minimum Rust version to 1.64.
    • Removed unsafe from WritableElement trait declaration.
    • Altered the behavior regarding .npy extensions of the file names within .npz archives to match NumPy's behavior, by @jturner314. See #76. Specifically,
      • NpzWriter::add_array() now appends .npy to the name.
      • NpzReader::names() now strips a single .npy (if present) from the end of each name.
      • NpzReader::by_name() now tries {name}.npy if {name} is not present in the archive.

    New Features

    • Added NpzWriter::new_with_options(), which allows for different compression options, etc., when writing .npz files. By @DCNick3. See #66 for the motivation.
    Open source →
  4. 0.8.1 05 Nov 2021
    Release notes
    • Added support for complex floating point element types with the new num-complex-0_4 feature.
    Open source →
  5. 0.8.0 07 Apr 2021
    Release notes
    • Updated to ndarray 0.15.
    • Updated to py_literal 0.4.
    • Updated to Rust 1.49.
    Open source →
  6. 0.7.2 07 Apr 2021
    Release notes
    • Added a .finish() method to NpzWriter. All users of NpzWriter should call this method, after the write of the last array, in order to properly handle errors. (Without calling .finish(), dropping will automatically attempt to finish the file, but errors will be silently ignored.)
    • Changed the write_npy convenience function and the NpzWriter::add_array method to buffer writes using BufWriter. This significantly improves write performance for arrays which are not in standard or Fortran layout. The docs of WriteNpyExt::write_npy have also been updated to recommend that users wrap the writer in a BufWriter. Thanks to [@bluss] for reporting the unbuffered writes issue and reviewing the PR.
    • Changed WriteNpyExt::write_npy to always call .flush() before returning. This is convenient when the writer passed to WriteNpyExt::write_npy is wrapped in a BufWriter.
    Open source →
  7. 0.7.1 19 Jan 2021
    Release notes
    • Added support for viewing byte slices as .npy files, primarily for use with memory-mapped files. See the ViewNpyExt and ViewMutNpyExt extension traits. By [@n3vu0r] and [@jturner314].
    • Added support for creating files larger than available memory with write_zeroed_npy.
    • Improved handling of overflow in the number of bytes to read as specified by the shape and element type in the .npy file header. Before, if the number of bytes of data was more than isize::MAX, the implementation would attempt to create the array anyway and panic. Now, it detects this case before attempting to create the array and returns Err(ReadNpyError::LengthOverflow) instead.
    Open source →
  8. 0.7.0 03 Dec 2020
    Release notes
    • Updated to ndarray 0.14.
    • Updated to Rust 1.42.
    Open source →
  9. 0.6.0 01 Sep 2020
    Release notes
    • Changed write_npy to take the array by reference instead of by value, by [@KarelPeeters].
    Open source →
  10. 0.5.0 08 Oct 2019
    Release notes
    • Updated to ndarray 0.13.
    • Updated to Rust 1.38.
    • Added read_npy and write_npy convenience functions.
    • Added support for npy format version 3.0.
    • Renamed ReadableElement::read_vec to ::read_to_end_exact_vec.
    • Refactored the error types and variants, including removing the associated Error type from Readable/WritableElement and updating to the new style of std::error::Error implementation.
    • Updated the padding calculation to make the total header length be divisible by 64 instead of just 16 when writing files. (See numpy/numpy#9025.)
    • Fixed determination of file format version when the addition of padding changes the required version when writing the file.
    • Fixed miscellaneous bugs related to overflow and error handling.
    Open source →
  11. 0.4.0 25 Feb 2019
    Release notes
    • Added support for reading/writing arrays of bool, by [@tobni] and [@jturner314].
    • Updated to zip 0.5.
    • Updated to Rust 1.32.
    • Renamed the compressed_npz_default feature to compressed_npz because the zip crate no longer allows the user to select the compression backend.
    Open source →
  12. 0.3.0 01 Sep 2018
    Release notes
    • Updated to ndarray 0.12.
    • Updated to num-traits 0.2 (replacing dependency on num).
    • Updated to py_literal 0.2.
    Open source →
  13. 0.2.0 23 Jun 2018
    Release notes
    • Updated to zip 0.4.
    • Made the compression backend for compressed .npz files user-selectable.
    • Reworked how feature selection works. This should only affect you if you use default-features = false, features = ["compressed_npz"].
    Open source →
  14. 0.1.1 22 Apr 2018
    Release notes
    • Improved crate documentation (no functional changes).
    Open source →
  15. 0.1.0 22 Apr 2018
    Release notes
    • Initial release.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive