PackageTrack
Sign in Get early access

npyz

NumPy file format (de-)serialization. Fork of outdated npy-rs.

0.9.1 7.0M downloads/mo #3785 most downloaded on crates.io ExpHP/npyz

What this package is like to depend on

Last release 3 months ago

02 May 2026

Ships unpredictably

gaps range from 2 weeks to 1.4 years

Nearly every release is documented

notes for 14 of 15 stable releases

Nothing withdrawn

no release was ever pulled

5 years old

15 releases · first in 2021

2 releases in the last 12 months

see the full history below

Release timeline

15 releases · Jul 2021 to May 2026
2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 15
  1. 0.9.1 02 May 2026
    Release notes

    Added

    • WriterBuilder::begin_2d. Similar to begin_1d, this allows the second dimension to be inferred based on the number of items written. Thanks, @Yomguithereal!
    Open source →
  2. 0.9.0 15 Apr 2026
    Release notes

    Changed

    • The T: Serialize bound has been removed from the WriterBuilder trait. This may introduce places in downstream code where a T: npyz::Serialize bound must now be explicitly added.

    Added

    • Limited support for pickled arrays. See examples/pickle.rs. Thanks, @paroga!
      • TypeChar::Object (numpy's "|O")
      • {TypeStr, DType NpyHeader}::uses_pickled_array() boolean function.
      • NpyFile can open files with pickled arrays, but it cannot extract items.
      • WriteOptions::new_header_only, WriterBuilder::write_header_only makes it possible to write headers wwith object dtypes.
    Open source →
  3. 0.8.4 15 May 2025
    Release notes

    Changed

    • Bug fix: impl AutoSerialize for Complex now properly generates types c8 and c16 instead of c4 and c8. Thanks @calder!
    • Bug fix: The public dependency zip is now properly re-exported.
    • Fixes some warnings generated by the #[derive(...)] macros in newer rust versions.
    Open source →
  4. 0.8.3 23 Dec 2023
    Release notes

    Added

    • The "npyz" feature is now supported when building for webassembly. Thanks, @KeKsBoTer!
    Open source →
  5. 0.8.2 03 Dec 2023
    Release notes

    Added

    • npyz now has support for half-precision floats using the half crate. This support can be enabled with the "half" feature. Thanks, @KeKsBoTer!
    Open source →
  6. 0.8.1 05 Jun 2023
    Release notes

    Added

    • npyz now has experimental support for WASM. Thanks, @bluenote10! Not all cargo features are supported/tested yet; please see this issue.
    Open source →
  7. 0.8.0 04 Apr 2023
    Release notes

    Added

    • Added NpyHeader which is a more lightweight form of NpyFile that isn't a read adapter. You could use this for instance to parse multiple raw data streams using the same header.

    Changed

    • Some of the methods on NpyFile have been moved to NpyHeader, and are now accessed via Deref. If you have been using UFCS to call these methods, you may need to update those callsites.
    Open source →
  8. 0.7.4 01 Feb 2023
    Release notes

    Added

    • npyz now uses py_literal to parse the NPY header, allowing it to support a far greater amount of syntax than before. Thanks @sudo-carson!
    • String metacharacters like ' in structured array member names are now properly escaped when writing files.
    • Dimensions of length 0 in an array member of a structured array are now permitted. (e.g. dtype=[('a', '>i4', (4,0,4))]).
    Open source →
  9. 0.7.3 23 Dec 2022
    Release notes

    Changed

    • Writers are now flushed when .finish() is called. Thanks @sirno!
    Open source →
  10. 0.7.2 06 Dec 2022
    Release notes

    This is an extremely minor update that just updates the README.

    Open source →
  11. 0.7.1 20 Sep 2022
    Release notes

    Changed

    • Fixes some warnings generated by the #[derive(...)] macros in newer rust versions.
    • These changes were part of 0.8.4, but I hadn't released a new npyz-derive! My apologies.
    Open source →
  12. 0.7.0 27 Aug 2022
    Release notes

    Added

    • Added serialization and deserialization for the U type. Supported rust types are Vec<char>, Vec<u32>, and String (and, of course, [char], [u32], and str for serialization).
    • Added support for the a type, which is just an alias of S.
    • Added the FixedSizeBytes wrapper type around [u8; N], which enables deserialization of type V without individual allocations per element.
    • Added the arrayvec feature. This enables deserialization of types U and S without individual allocations per element. (thanks to @m-dupont for the initial implementation)
    • NpyReader::shape and NpyReader::dtype accessors, for downstream code without access to an NpyFile.
    • Exposed various data from TypeStr. New types include Endianness, TypeChar, and TimeUnits types. TypeStr now has getters to extract these fields. (thanks to @Shatur for requesting this)

    Changed

    • np.datetime64 now uses i64 instead of u64 for serialization, as it is defined to use a symmetric interval around the epoch.
    • DType::num_bytes has been changed to return Option<usize>, rather than panicking when the described datatype is too large to fit in the target platform's usize type.
    Open source →
  13. 0.6.1 07 Jul 2021

    Nothing published for this version

  14. 0.6.0 06 Jul 2021
    Release notes

    Added

    • This CHANGELOG.
    • Tools for NPZ files and scipy sparse matrices, and the associated "npz" feature.
    • Nested structs inside array fields of a structured array now work.
    • NpyWriter now allows T: ?Sized.

    Changed

    • In order to fix nested structs inside array fields, the layout of DType had to be changed by removing shape from DType::Plain and adding a new DType::Array variant.
    • NpyReader was split into two types: You now start by creating an NpyFile (which is NOT parameterized over T), which can then be turned into an NpyReader. The purpose of the split is to permit code to make multiple attempts to deserialize into different rust types. (e.g. indices in sparse NPZ files may be either i32 or i64)
    • Builder was changed to a typestate API in order to avoid some runtime panics and to better accomodate NPZ. Generally speaking:
      • Code that writes NPY/NPZ files now typically has to use npyz::WriterBuilder;.
      • Calls to npyz::Builder::new() should now be npyz::WriteOptions::new().
      • begin_1d(), begin_nd() no longer take arguments. There are now .shape(shape) and and .writer(writer) methods that must be called to provide these things.
    Open source →
  15. 0.5.0 02 Jul 2021
    Release notes

    Added

    • Initial release of the fork. The version started at 0.5.0 to indicate that this version is a breaking change from 0.4.0 of the original npy.
    • Adds multidimensional arrays. Hallelujah.
    • Adds byteslice and complex types.
    • Adds big endian support.
    • Adds NpyReader for reading from an io::Read
    • Adds Builder and NpyWriter for writing to an io::Write
    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