Skip to content

Commit 83048db

Browse files
Volodymyr OrlovVolodymyr Orlov
authored andcommitted
fix: small doc changes
1 parent ab7f466 commit 83048db

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/linalg/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ pub trait BaseVector<T: RealNumber>: Clone + Debug {
166166
/// ```
167167
fn unique(&self) -> Vec<T>;
168168

169-
/// Compute the arithmetic mean.
169+
/// Computes the arithmetic mean.
170170
fn mean(&self) -> T {
171171
let n = self.len();
172172
let mut mean = T::zero();
@@ -176,7 +176,7 @@ pub trait BaseVector<T: RealNumber>: Clone + Debug {
176176
}
177177
mean / T::from_usize(n).unwrap()
178178
}
179-
/// Compute the standard deviation.
179+
/// Computes the standard deviation.
180180
fn std(&self) -> T {
181181
let n = self.len();
182182

src/linalg/stats.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
//! # Various Statistical Methods
22
//!
3-
//!
3+
//! This module provides reference implementations for various statistical functions.
4+
//! Concrete implementations of the `BaseMatrix` trait are free to override these methods for better performance.
45
56
use crate::linalg::BaseMatrix;
67
use crate::math::num::RealNumber;
78

89
/// Defines baseline implementations for various statistical functions
910
pub trait MatrixStats<T: RealNumber>: BaseMatrix<T> {
10-
/// Compute the arithmetic mean along the specified axis.
11+
/// Computes the arithmetic mean along the specified axis.
1112
fn mean(&self, axis: u8) -> Vec<T> {
1213
let (n, m) = match axis {
1314
0 => {
@@ -34,7 +35,7 @@ pub trait MatrixStats<T: RealNumber>: BaseMatrix<T> {
3435
x
3536
}
3637

37-
/// Compute the standard deviation along the specified axis.
38+
/// Computes the standard deviation along the specified axis.
3839
fn std(&self, axis: u8) -> Vec<T> {
3940
let (n, m) = match axis {
4041
0 => {

0 commit comments

Comments
 (0)