Skip to content

Commit ed48109

Browse files
Final touches (#12)
* Introduction docs * Uniform formatting * Uniform naming convetions * Not needed anymore * Updated author list * Updated cargo.toml informations * Update Cargo.toml Co-Authored-By: LukeMathWalker <[email protected]> * Update Cargo.toml Co-Authored-By: LukeMathWalker <[email protected]>
1 parent 20b9eb2 commit ed48109

File tree

5 files changed

+43
-7
lines changed

5 files changed

+43
-7
lines changed

Cargo.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
[package]
22
name = "ndarray-stats"
33
version = "0.1.0"
4-
authors = ["Jim Turner <[email protected]>"]
4+
authors = ["Jim Turner <[email protected]>", "LukeMathWalker <[email protected]>"]
5+
6+
license = "MIT/Apache-2.0"
7+
8+
repository = "https://github.com/jturner314/ndarray-stats"
9+
documentation = "https://docs.rs/ndarray-stats/"
10+
11+
description = "Statistical routines for ArrayBase, the n-dimensional array data structure provided by ndarray."
12+
13+
keywords = ["array", "multidimensional", "statistics", "matrix", "ndarray"]
14+
categories = ["data-structures", "science"]
515

616
[dependencies]
717
ndarray = "0.12"

src/correlation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use ndarray::prelude::*;
22
use ndarray::Data;
33
use num_traits::{Float, FromPrimitive};
44

5-
/// Extension trait for ArrayBase providing functions
5+
/// Extension trait for `ArrayBase` providing functions
66
/// to compute different correlation measures.
77
pub trait CorrelationExt<A, S>
88
where

src/histogram/strategies.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use ndarray::prelude::*;
2222
use ndarray::Data;
2323
use num_traits::{FromPrimitive, NumOps, Zero};
24-
use super::super::{QuantileExt, QuantileExt1d};
24+
use super::super::{QuantileExt, Quantile1dExt};
2525
use super::super::interpolate::Nearest;
2626
use super::{Edges, Bins};
2727

src/lib.rs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
//! The [`ndarray-stats`] crate exposes statistical routines for `ArrayBase`,
2+
//! the *n*-dimensional array data structure provided by [`ndarray`].
3+
//!
4+
//! Currently available routines include:
5+
//! - [`order statistics`] (minimum, maximum, quantiles, etc.);
6+
//! - [`partitioning`];
7+
//! - [`correlation analysis`] (covariance, pearson correlation);
8+
//! - [`histogram computation`].
9+
//!
10+
//! Please feel free to contribute new functionality! A roadmap can be found [`here`].
11+
//!
12+
//! Our work is inspired by other existing statistical packages such as
13+
//! [`NumPy`] (Python) and [`StatsBase.jl`] (Julia) - any contribution bringing us closer to
14+
//! feature parity is more than welcome!
15+
//!
16+
//! [`ndarray-stats`]: https://github.com/jturner314/ndarray-stats/
17+
//! [`ndarray`]: https://github.com/rust-ndarray/ndarray
18+
//! [`order statistics`]: trait.QuantileExt.html
19+
//! [`partitioning`]: trait.Sort1dExt.html
20+
//! [`correlation analysis`]: trait.CorrelationExt.html
21+
//! [`histogram computation`]: histogram/index.html
22+
//! [`here`]: https://github.com/jturner314/ndarray-stats/issues/1
23+
//! [`NumPy`]: https://docs.scipy.org/doc/numpy-1.14.1/reference/routines.statistics.html
24+
//! [`StatsBase.jl`]: https://juliastats.github.io/StatsBase.jl/latest/
25+
26+
127
#[macro_use(azip, s)]
228
#[cfg_attr(test, macro_use(array))]
329
extern crate ndarray;
@@ -13,7 +39,7 @@ extern crate ndarray_rand;
1339
extern crate quickcheck;
1440

1541
pub use maybe_nan::{MaybeNan, MaybeNanExt};
16-
pub use quantile::{interpolate, QuantileExt, QuantileExt1d};
42+
pub use quantile::{interpolate, QuantileExt, Quantile1dExt};
1743
pub use sort::Sort1dExt;
1844
pub use correlation::CorrelationExt;
1945
pub use histogram::HistogramExt;

src/quantile.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ where
411411
}
412412
}
413413

414-
/// Quantile methods for 1-dimensional arrays.
415-
pub trait QuantileExt1d<A, S>
414+
/// Quantile methods for 1-D arrays.
415+
pub trait Quantile1dExt<A, S>
416416
where
417417
S: Data<Elem = A>,
418418
{
@@ -450,7 +450,7 @@ pub trait QuantileExt1d<A, S>
450450
I: Interpolate<A>;
451451
}
452452

453-
impl<A, S> QuantileExt1d<A, S> for ArrayBase<S, Ix1>
453+
impl<A, S> Quantile1dExt<A, S> for ArrayBase<S, Ix1>
454454
where
455455
S: Data<Elem = A>,
456456
{

0 commit comments

Comments
 (0)