From a335d29347d22ebf97fef7dd82d26a68a76bf373 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Tue, 15 Jul 2025 01:05:32 +0100 Subject: [PATCH] Simplify t-test assertion in unit test for clarity --- src/compute/stats/inferential.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/compute/stats/inferential.rs b/src/compute/stats/inferential.rs index a2d00e9..8a6f28a 100644 --- a/src/compute/stats/inferential.rs +++ b/src/compute/stats/inferential.rs @@ -106,11 +106,7 @@ mod tests { let sample1 = Matrix::from_vec(vec![1.0, 2.0, 3.0, 4.0, 5.0], 1, 5); let sample2 = Matrix::from_vec(vec![6.0, 7.0, 8.0, 9.0, 10.0], 1, 5); let (t_statistic, p_value) = t_test(&sample1, &sample2); - assert!( - (t_statistic + 5.0).abs() < EPS, - "Expected t-statistic close to -5.0 found: {}", - t_statistic - ); + assert!((t_statistic + 5.0).abs() < EPS); assert!(p_value > 0.0 && p_value < 1.0); }