Add test for median_horizontal function to validate horizontal median calculation

This commit is contained in:
Palash Tyagi 2025-07-08 21:03:05 +01:00
parent 5779c6b82d
commit b2a799fc30

View File

@ -295,6 +295,10 @@ mod tests {
let expected_v = vec![2.5, 3.5, 4.5]; let expected_v = vec![2.5, 3.5, 4.5];
assert_eq!(mv, expected_v, "{:?} expected: {:?}", expected_v, mv); assert_eq!(mv, expected_v, "{:?} expected: {:?}", expected_v, mv);
let mh = median_horizontal(&x).column(0).to_vec();
let expected_h = vec![2.0, 5.0];
assert_eq!(mh, expected_h, "{:?} expected: {:?}", expected_h, mh);
} }
#[test] #[test]