ndarray-npy

Library Featured

.npy and .npz file format support for ndarray

Checked · Sources

Downloads
560,950
Dependents
99
Stars
71
Forks
28
Contributors
8
Commits
279
Latest release
0.10.0 ·

About

From the project README ·

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 fixed-size integer, primitive floating point, complex floating point, and bool types as the array element type. You can implement the *Element traits for your own types, but the next breaking release of this library will probably change those traits.

Future plans include support for:

  • Memory-mapped .npz files. (Memory-mapped .npy files are already supported.)
  • More element types (e.g. structs). If you need support for structs before this is implemented in ndarray-npy, check out the npy crate.
  • Possibly merging this with the npy crate.

Using with Cargo

To use with the default features:

[dependencies]
ndarray-npy = "0.10.0"
Read the full README

The default feature set includes the compressed_npz feature, which enables support for uncompresssed and compressed .npz files, and the num-complex-0_4 feature, which enables support for complex floating point element types provided by version 0.4 of the num-complex crate. The compressed_npz feature requires a dependency on the zip crate and a compression backend crate.

To use without the default features:

[dependencies]
ndarray-npy = { version = "0.10.0", default-features = false }

With default-features = false, ndarray-npy provides support only for .npy files, not .npz files, and it does not provide support for complex number elements. If you want support for .npz files or complex number elements, you can select additional features:

  • npz enables support for uncompressed .npz files. This requires a dependency on the zip crate.
  • compressed_npz enables support for uncompressed and compressed .npz files. This requires a dependency on the zip crate and a compression backend crate.
  • num-complex-0_4 enables support for complex floating point element types provided by version 0.4 of the num-complex crate.

For example, you can use just the npz feature:

[dependencies.ndarray-npy]
version = "0.10.0"
default-features = false
features = ["npz"]
Library authors

Library authors should specify their dependency on ndarray-npy like this:

[dependencies.ndarray-npy]
version = "0.10.0"
default-features = false
features = [FEATURES_LIST_HERE]

where the features list is one of the following:

  • [] if your crate does not depend on .npz file support
  • ["npz"] if your crate depends on .npz file support but not compression
  • ["compressed_npz"] if your crate depends on .npz file support with compression
  • ["num-complex-0_4"] if your crate depends on support for complex element types but not .npz files
  • ["num-complex-0_4", "npz"] if your crate depends on support for complex element types and .npz files but not compression
  • ["num-complex-0_4", "compressed_npz"] if your crate depends on support for complex element types and .npz files with compression

Releases

See RELEASES.md.

Contributing

Please feel free to create issues and submit PRs. PRs adding more tests would be especially appreciated.

License

Copyright 2018–2025 Jim Turner and ndarray-npy developers

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.

Runs on
GPU support unknown
What shows it
  • no dependency or feature matches a backend row
Native code
None found
  • No native code found
Python bindings
No Python binding crate found
License
Apache-2.0 OR MIT

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

ndarray-npy beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
ndarray-npy This page Featured

.npy and .npz file format support for ndarray

560,950 downloads over 30 days 99 71 0.10.0 GPU support unknown No native code found Apache-2.0 OR MIT
lance Featured

A columnar data format that is 100x faster than Parquet for random access.

915,526 downloads over 30 days 48 7,268 14.0.2 GPU support unknown Binds native code: ring (feature credential-vendor-gcp), lz4-sys (feature lz4), zstd-sys (feature zstd). Build uses a native toolchain: cc Apache-2.0
npyz Featured

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

467,634 downloads over 30 days 36 33 0.9.1 GPU support unknown No native code found MIT
zarrs Featured

A library for the Zarr storage format for multidimensional arrays and metadata

75,052 downloads over 30 days 51 285 0.23.14 GPU support unknown Binds native code: blosc-src (feature blosc), gdeflate-sys (feature gdeflate), zfp-sys (feature zfp), zstd-sys (feature zstd) Apache-2.0 OR MIT
vortex Listed

An extensible, state-of-the-art framework for columnar compression, and the fastest FOSS columnar file format. Formerly at @spiraldb, now an Incubation Stage project at LFAI&Data, part of the Linux Foundation.

98,129 downloads over 30 days 32 3,310 0.93.0 GPU support unknown Binds native code: zstd-sys Apache-2.0

Pure-Rust NetCDF-3 classic and NetCDF-4 (HDF5-backed) file reader

36,012 downloads over 30 days 10 11 0.12.1 GPU support unknown No native code found Apache-2.0 OR MIT
compressr App New

Model conversion and quantization with no Python: reads SafeTensors, GGUF, TCF and PyTorch state dicts, writes SafeTensors, GGUF and TCF, and quantizes to Q2_K through Q8_0 and IQ4 formats, including Q4_K_M mixes. GPTQ, AWQ, NF4, FP8, EXL2 and ONNX input are not implemented.

Python bindings

23 downloads over 30 days Not applicable 0 0.2.1 GPU support unknown No native code found Apache-2.0
Why FeaturedIt passes every Featured gate.

What it meets

  • It has 71 active dependents and 48 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days.
  • Active dependents are at 100% of their peak. Featured needs at least 50%.
  • Docs are present. The release commit or a manifest ties the crate to the repository.
  • No vulnerability advisory stays unpatched past the grace window. At least one version is neither a prerelease nor 0.0.x.
  • The last activity is on 1 Nov 2026, 8 days ago. The rules expect an update within 560 days. Dormancy rule

Exact rules: Featured library. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 0.10.0 base 140, doubled for 560950 downloads per month, doubled for 70.5 active users: E = 560 days
  • dormancy: last activity 2026-11-01, 8 days ago, E = 560: active
  • featured: featured: active_users 70.5, new_adopters 48, former_glory 1

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption71 active dependents, 48 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents70.5crates.io database dumpYes
New dependents (365 days)48crates.io database dumpYes
Peak active dependents70crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 8 days ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-11-01GitHub repositoryYes
Latest release2025-12-15crates.io database dumpYes
First release2018-04-22crates.io database dumpYes
Latest version0.10.0crates.io database dumpYes
Days the oldest outside issue waits for a reply847GitHub repositoryYes
Maintainer replies over 365 days18GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution15 releases, 560,950 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases15crates.io database dumpYes
Downloads over 30 days560950crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository71 stars, 28 forks, 8 contributors, 279 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars71GitHub repositoryYes — one part of the repository route
GitHub forks28GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account8GitHub contributorsYes — one part of the repository route
Commits on the default branch279GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0 OR MITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesNo native code foundcrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly99crates.io database dumpNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.