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
Releases
latest 15-
0.10.015 Dec 2025Release notes
Open source →Breaking Changes
- Updated to
ndarray0.17.1. - Updated to
zip6. - Updated minimum Rust version to 1.84.
- Changed the
arrayparameter ofNpzWriter::add_arrayfrom&ArrayBase<S, D>toT: WriteNpyExt + ?Sizedto support the newArrayReftype inndarray0.17.1.
New Features
- Added new
create_new_npyconvenience function which usesFile::create_new. (In contrast, the existingwrite_npyfunction usesFile::create.) - Added
NpzWriter::add_array_with_options, which overrides the options for that specific array. - Publicly exposed the
npymodule to provide access to header-related functionality in thenpy::headermodule. In most cases, users do not need this functionality, but some users have requested access to it for specific use cases. - Implemented
WriteNpyExtfor the newArrayReftype inndarray0.17.1. - Removed the implicit
Sizedbound fromwrite_npyto support the newArrayReftype inndarray0.17.1.
- Updated to
-
0.9.114 Sep 2024 -
0.9.014 Sep 2024Release notes
Open source →Breaking Changes
- Updated to
ndarray0.16. - Updated to
zip2. - Updated minimum Rust version to 1.64.
- Removed
unsafefromWritableElementtrait declaration. - Altered the behavior regarding
.npyextensions of the file names within.npzarchives to match NumPy's behavior, by @jturner314. See #76. Specifically,NpzWriter::add_array()now appends.npyto the name.NpzReader::names()now strips a single.npy(if present) from the end of each name.NpzReader::by_name()now tries{name}.npyif{name}is not present in the archive.
New Features
- Added
NpzWriter::new_with_options(), which allows for different compression options, etc., when writing.npzfiles. By @DCNick3. See #66 for the motivation.
- Updated to
-
0.8.105 Nov 2021Release notes
Open source →- Added support for complex floating point element types with the new
num-complex-0_4feature.
- Added support for complex floating point element types with the new
-
0.8.007 Apr 2021Release notes
Open source →- Updated to
ndarray0.15. - Updated to
py_literal0.4. - Updated to Rust 1.49.
- Updated to
-
0.7.207 Apr 2021Release notes
Open source →- Added a
.finish()method toNpzWriter. All users ofNpzWritershould 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_npyconvenience function and theNpzWriter::add_arraymethod to buffer writes usingBufWriter. This significantly improves write performance for arrays which are not in standard or Fortran layout. The docs ofWriteNpyExt::write_npyhave also been updated to recommend that users wrap the writer in aBufWriter. Thanks to [@bluss] for reporting the unbuffered writes issue and reviewing the PR. - Changed
WriteNpyExt::write_npyto always call.flush()before returning. This is convenient when the writer passed toWriteNpyExt::write_npyis wrapped in aBufWriter.
- Added a
-
0.7.119 Jan 2021Release notes
Open source →- Added support for viewing byte slices as
.npyfiles, primarily for use with memory-mapped files. See theViewNpyExtandViewMutNpyExtextension 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
.npyfile header. Before, if the number of bytes of data was more thanisize::MAX, the implementation would attempt to create the array anyway and panic. Now, it detects this case before attempting to create the array and returnsErr(ReadNpyError::LengthOverflow)instead.
- Added support for viewing byte slices as
-
0.7.003 Dec 2020 -
0.6.001 Sep 2020Release notes
Open source →- Changed
write_npyto take the array by reference instead of by value, by [@KarelPeeters].
- Changed
-
0.5.008 Oct 2019Release notes
Open source →- Updated to
ndarray0.13. - Updated to Rust 1.38.
- Added
read_npyandwrite_npyconvenience functions. - Added support for
npyformat version 3.0. - Renamed
ReadableElement::read_vecto::read_to_end_exact_vec. - Refactored the error types and variants, including removing the associated
Errortype fromReadable/WritableElementand updating to the new style ofstd::error::Errorimplementation. - 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.
- Updated to
-
0.4.025 Feb 2019Release notes
Open source →- Added support for reading/writing arrays of
bool, by [@tobni] and [@jturner314]. - Updated to
zip0.5. - Updated to Rust 1.32.
- Renamed the
compressed_npz_defaultfeature tocompressed_npzbecause thezipcrate no longer allows the user to select the compression backend.
- Added support for reading/writing arrays of
-
0.3.001 Sep 2018Release notes
Open source →- Updated to
ndarray0.12. - Updated to
num-traits0.2 (replacing dependency onnum). - Updated to
py_literal0.2.
- Updated to
-
0.2.023 Jun 2018Release notes
Open source →- Updated to
zip0.4. - Made the compression backend for compressed
.npzfiles user-selectable. - Reworked how feature selection works. This should only affect you if you use
default-features = false, features = ["compressed_npz"].
- Updated to
-
0.1.122 Apr 2018 -
0.1.022 Apr 2018