Skip to content

Commit

Permalink
fixed formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Dubovikov authored and bluss committed Jan 7, 2021
1 parent 28c797e commit 0e292f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/numeric/impl_numeric.rs
Expand Up @@ -154,7 +154,7 @@ where
/// ```
pub fn var(&self, ddof: A) -> A
where
A: Float + FromPrimitive
A: Float + FromPrimitive,
{
let zero = A::from_usize(0).expect("Converting 0 to `A` must not fail.");
let n = A::from_usize(self.len()).expect("Converting length to `A` must not fail.");
Expand Down Expand Up @@ -216,12 +216,11 @@ where
/// ```
pub fn std(&self, ddof: A) -> A
where
A: Float + FromPrimitive
A: Float + FromPrimitive,
{
self.var(ddof).sqrt()
}


/// Return sum along `axis`.
///
/// ```
Expand Down
2 changes: 1 addition & 1 deletion src/private.rs
Expand Up @@ -21,5 +21,5 @@ macro_rules! private_impl {
fn __private__(&self) -> crate::private::PrivateMarker {
crate::private::PrivateMarker
}
}
};
}
2 changes: 0 additions & 2 deletions tests/numeric.rs
Expand Up @@ -68,7 +68,6 @@ fn sum_mean_empty() {
fn var() {
let a = array![1., -4.32, 1.14, 0.32];
assert_abs_diff_eq!(a.var(0.), 5.049875, epsilon = 1e-8);

}

#[test]
Expand Down Expand Up @@ -102,7 +101,6 @@ fn var_empty_arr() {
fn std() {
let a = array![1., -4.32, 1.14, 0.32];
assert_abs_diff_eq!(a.std(0.), 2.24719, epsilon = 1e-5);

}

#[test]
Expand Down

0 comments on commit 0e292f0

Please sign in to comment.