ndarray-stats

Library Featured

Statistical routines for the n-dimensional array data structures provided by ndarray.

Checked · Sources

Downloads
592,313
Dependents
115
Stars
239
Forks
35
Contributors
14
Commits
138
Latest release
0.7.0 ·

About

From the project README ·

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
  • 0.6.0

    • Breaking changes

      • Minimum supported Rust version: 1.64.0
      • Updated to ndarray:v0.16.0
      • Updated to approx:v0.5.0
    • Updated to ndarray-rand:v0.15.0

    • Updated to indexmap:v2.4

    • Updated to itertools:v0.13

    Contributors: @bluss

  • 0.5.1

    • Fixed bug in implementation of MaybeNaN::remove_nan_mut for f32 and f64 for 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

  • 0.5.0

    • Breaking changes
      • Minimum supported Rust version: 1.49.0
      • Updated to ndarray:v0.15.0

    Contributors: @Armavica, @cassiersg

  • 0.4.0

    • Breaking changes
      • Minimum supported Rust version: 1.42.0
    • New functionality:
      • Summary statistics:
        • Weighted variance
        • Weighted standard deviation
    • Improvements / breaking changes:
      • Documentation improvements for Histograms
      • Updated to ndarray:v0.14.0

    Contributors: @munckymagik, @nilgoyette, @LukeMathWalker, @lebensterben, @xd009642

  • 0.3.0

    • Breaking changes
      • Minimum supported Rust version: 1.37
    • New functionality:
      • Deviation functions:
        • Counts equal/unequal
        • l1, l2, linf distances
        • (Root) mean squared error
        • Peak signal-to-noise ratio
      • Summary statistics:
        • Weighted sum
        • Weighted mean
    • Improvements / breaking changes:
      • Updated to ndarray:v0.13.0

    Contributors: @munckymagik, @nilgoyette, @jturner314, @LukeMathWalker

  • 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
    • 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_skipnan
        • argmax / argmax_skipnan
        • Optimized bulk quantile computation (quantiles_mut, quantiles_axis_mut)
    • Fixes:
      • Reduced occurrences of overflow for interpolate::midpoint

    Contributors: @jturner314, @LukeMathWalker, @phungleson, @munckymagik

  • 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.

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-stats beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
ndarray-stats This page Featured

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
linfa-linalg Listed Dormant

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

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 days
  • dormancy: last activity 2025-12-28, 316 days ago, E = 560: active
  • rot: oldest unanswered issue 2408 days (limit 270), no maintainer reply in 365 days
  • featured: 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
Adoption43 active dependents, 20 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents43crates.io database dumpYes
New dependents (365 days)20crates.io database dumpYes
Peak active dependents49crates.io database dumpYes
Active dependents as a share of the peak0.9153crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 10 months ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2025-12-28GitHub repositoryYes
Latest release2025-12-28crates.io database dumpYes
First release2018-11-21crates.io database dumpYes
Latest version0.7.0crates.io database dumpYes
Days the oldest outside issue waits for a reply2408GitHub repositoryYes
Maintainer replies over 365 days0GitHub 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
Distribution8 releases, 592,313 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases8crates.io database dumpYes
Downloads over 30 days592313crates.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
Repository239 stars, 35 forks, 14 contributors, 138 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars239GitHub repositoryYes — one part of the repository route
GitHub forks35GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account14GitHub contributorsYes — one part of the repository route
Commits on the default branch138GitHub 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 directly115crates.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.