NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #3823 most downloaded on crates.io
NumPy file format (de-)serialization. Fork of outdated npy-rs.
Last release 5 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
One column per quarter.
WriterBuilder::begin_2d. Similar to begin_1d, this allows the second dimension to be inferred based on the number of items written. Thanks, @Yomguithe
WriterBuilder::begin_2d. Similar to begin_1d, this allows the second dimension to be inferred based on the number of items written. Thanks, @Yomguithereal!The T: Serialize bound has been removed from the WriterBuilder trait. This may introduce places in downstream code where a T: npyz::Serialize bound mu
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.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.Bug fix: impl AutoSerialize for Complex now properly generates types c8 and c16 instead of c4 and c8. Thanks @calder!
impl AutoSerialize for Complex now properly generates types c8 and c16 instead of c4 and c8. Thanks @calder!zip is now properly re-exported.#[derive(...)] macros in newer rust versions.The "npyz" feature is now supported when building for webassembly. Thanks, @KeKsBoTer!
"npyz" feature is now supported when building for webassembly. Thanks, @KeKsBoTer!npyz now has support for half-precision floats using the `half` crate. This support can be enabled with the "half" feature. Thanks, @KeKsBoTer!
half crate. This support can be enabled with the "half" feature. Thanks, @KeKsBoTer!npyz now has experimental support for WASM. Thanks, @bluenote10! Not all cargo features are supported/tested yet; please see this issue.
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 stre
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.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.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!
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!' in structured array member names are now properly escaped when writing files.dtype=[('a', '>i4', (4,0,4))]).Writers are now flushed when .finish() is called. Thanks @sirno!
.finish() is called. Thanks @sirno!This is an extremely minor update that just updates the README.
This is an extremely minor update that just updates the README.
Fixes some warnings generated by the #[derive(...)] macros in newer rust versions.
#[derive(...)] macros in newer rust versions.Added serialization and deserialization for the U type. Supported rust types are Vec , Vec , and String (and, of course, [char], [u32], and str for se
U type.
Supported rust types are Vec<char>, Vec<u32>, and String
(and, of course, [char], [u32], and str for serialization).a type, which is just an alias of S.FixedSizeBytes wrapper type around [u8; N], which enables
deserialization of type V without individual allocations per element.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.TypeStr. New types include Endianness, TypeChar,
and TimeUnits types. TypeStr now has getters to extract these fields.
(thanks to @Shatur for requesting this)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.Nothing published for this version
Tools for NPZ files and scipy sparse matrices, and the associated `"npz"` feature.
"npz" feature.NpyWriter now allows T: ?Sized.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:
use npyz::WriterBuilder;.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.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.
npy.NpyReader for reading from an io::ReadBuilder and NpyWriter for writing to an io::WriteYour coding agent can read these notes before it upgrades. Set up the MCP server →