diff --git a/src/numeric/impl_numeric.rs b/src/numeric/impl_numeric.rs index f6af73e51..a3858f829 100644 --- a/src/numeric/impl_numeric.rs +++ b/src/numeric/impl_numeric.rs @@ -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."); @@ -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`. /// /// ``` diff --git a/src/private.rs b/src/private.rs index ea13164e4..552b31497 100644 --- a/src/private.rs +++ b/src/private.rs @@ -21,5 +21,5 @@ macro_rules! private_impl { fn __private__(&self) -> crate::private::PrivateMarker { crate::private::PrivateMarker } - } + }; } diff --git a/tests/numeric.rs b/tests/numeric.rs index cfb9e51d7..13f8433c5 100644 --- a/tests/numeric.rs +++ b/tests/numeric.rs @@ -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] @@ -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]