ndarray-stats
Library Featured
Statistical routines for the n-dimensional array data structures provided by ndarray.
- Downloads
- 592,313
- Dependents
- 115
- Stars
- 239
- Forks
- 35
- Contributors
- 14
- Commits
- 138
- Latest release
- 0.7.0 ·
About
This crate provides statistical methods for ndarray's ArrayRef type.
Currently available routines include:
- order statistics (minimum, maximum, median, quantiles, etc.);
- summary statistics (mean, skewness, kurtosis, central moments, etc.)
- partitioning;
- correlation analysis (covariance, pearson correlation);
- measures from information theory (entropy, KL divergence, etc.);
- deviation functions (distances, counts, errors, etc.);
- histogram computation.
See the documentation for more information.
Please feel free to contribute new functionality! A roadmap can be found here.
Using with Cargo
[dependencies]
ndarray = "0.17.1"
ndarray-stats = "0.7.0"
Read the full README
Releases
0.7.0
- Breaking changes
- Minimum supported Rust version:
1.65.0 - Updated to
ndarray:v0.17.1
- Minimum supported Rust version:
- Breaking changes
0.6.0
Breaking changes
- Minimum supported Rust version:
1.64.0 - Updated to
ndarray:v0.16.0 - Updated to
approx:v0.5.0
- Minimum supported Rust version:
Updated to
ndarray-rand:v0.15.0Updated to
indexmap:v2.4Updated to
itertools:v0.13
Contributors: @bluss
0.5.1
- Fixed bug in implementation of
MaybeNaN::remove_nan_mutforf32andf64for views with non-standard layouts. Before this fix, the bug could cause incorrect results, buffer overflows, etc., in this method and others which use it. Thanks to @JacekCzupyt for reporting the issue (#89). - Minor docs improvements.
Contributors: @jturner314, @BenMoon
- Fixed bug in implementation of
0.5.0
- Breaking changes
- Minimum supported Rust version:
1.49.0 - Updated to
ndarray:v0.15.0
- Minimum supported Rust version:
Contributors: @Armavica, @cassiersg
- Breaking changes
0.4.0
- Breaking changes
- Minimum supported Rust version:
1.42.0
- Minimum supported Rust version:
- New functionality:
- Summary statistics:
- Weighted variance
- Weighted standard deviation
- Summary statistics:
- Improvements / breaking changes:
- Documentation improvements for Histograms
- Updated to
ndarray:v0.14.0
Contributors: @munckymagik, @nilgoyette, @LukeMathWalker, @lebensterben, @xd009642
- Breaking changes
0.3.0
- Breaking changes
- Minimum supported Rust version:
1.37
- Minimum supported Rust version:
- New functionality:
- Deviation functions:
- Counts equal/unequal
l1,l2,linfdistances- (Root) mean squared error
- Peak signal-to-noise ratio
- Summary statistics:
- Weighted sum
- Weighted mean
- Deviation functions:
- Improvements / breaking changes:
- Updated to
ndarray:v0.13.0
- Updated to
Contributors: @munckymagik, @nilgoyette, @jturner314, @LukeMathWalker
- Breaking changes
0.2.0
- Breaking changes
- All
ndarray-stats' extension traits are now impossible to implement by users of the library (see #34) - Redesigned error handling across the whole crate, standardising on
Result
- All
- New functionality:
- Summary statistics:
- Harmonic mean
- Geometric mean
- Central moments
- Kurtosis
- Skewness
- Information theory:
- Entropy
- Cross-entropy
- Kullback-Leibler divergence
- Quantiles and order statistics:
argmin/argmin_skipnanargmax/argmax_skipnan- Optimized bulk quantile computation (
quantiles_mut,quantiles_axis_mut)
- Summary statistics:
- Fixes:
- Reduced occurrences of overflow for
interpolate::midpoint
- Reduced occurrences of overflow for
Contributors: @jturner314, @LukeMathWalker, @phungleson, @munckymagik
- Breaking changes
0.1.0
- Initial release by @LukeMathWalker and @jturner314.
Contributing
Please feel free to create issues and submit PRs.
License
Copyright 2018–2024 ndarray-stats 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.
Compatibility
- 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.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
Statistical routines for the n-dimensional array data structures provided by ndarray. |
592,313 downloads over 30 days | 115 | 239 | 0.7.0 | GPU support unknown | No native code found | Apache-2.0 OR MIT |
|
ndarray Featured
An n-dimensional array for general elements and for numerics. Lightweight array views and slicing; views support chunking and splitting. |
13,748,379 downloads over 30 days | 2,888 | 4,344 | 0.17.2 | GPU support unknown | Binds native code: cblas-sys (feature blas) | Apache-2.0 OR MIT |
|
statrs Featured
Statistical computing library for Rust |
4,515,476 downloads over 30 days | 444 | 839 | 0.19.1 | GPU support unknown | No native code found | MIT |
|
Pure-Rust implementation of linear algebra routines for ndarray |
198,623 downloads over 30 days | 20 | 39 | 0.2.1 | GPU support unknown | No native code found | Apache-2.0 OR MIT |
|
ndarray-interp Listed
Interpolation package for ndarray |
158,299 downloads over 30 days | 4 | 12 | 0.6.0 | GPU support unknown | No native code found | MIT |
|
numr Listed
The base for numerical code in Rust, in the role NumPy has in Python: n-dimensional tensors, linear algebra, FFT, statistics and autograd on CPU, CUDA and WebGPU. The backends use native kernels, with no cuBLAS, MKL or other vendor math library. |
1,673 downloads over 30 days | 7 | 59 | 0.15.2 | CUDA, WebGPU | Binds native code: ring (feature distributed) | Apache-2.0 |
Why FeaturedIt passes every Featured gate.
What it meets
- It has 43 active dependents and 20 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days.
- Active dependents are at 92% 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 28 Dec 2025, 316 days ago. The rules expect an update within 560 days. Dormancy rule
What else the check found
- The oldest outside issue waits 2408 days for a reply, past the limit of 270. No maintainer replied in 365 days. Rot signals rule
Exact rules: Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.7.0 base 140, doubled for 592313 downloads per month, doubled for 43 active users: E = 560 daysdormancy: last activity 2025-12-28, 316 days ago, E = 560: activerot: oldest unanswered issue 2408 days (limit 270), no maintainer reply in 365 daysfeatured: featured: active_users 43, new_adopters 20, former_glory 0.92
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
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption43 active dependents, 20 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 43 | crates.io database dump | Yes | |
| New dependents (365 days) | 20 | crates.io database dump | Yes | |
| Peak active dependents | 49 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 0.9153 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 10 months ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2025-12-28 | GitHub repository | Yes | |
| Latest release | 2025-12-28 | crates.io database dump | Yes | |
| First release | 2018-11-21 | crates.io database dump | Yes | |
| Latest version | 0.7.0 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 2408 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 0 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution8 releases, 592,313 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 8 | crates.io database dump | Yes | |
| Downloads over 30 days | 592313 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository239 stars, 35 forks, 14 contributors, 138 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 239 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 35 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 14 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 138 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | Apache-2.0 OR MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | No native code found | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 115 | crates.io database dump | No |
Corrections and review history
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.