Skip to content

Commit f9ac9d4

Browse files
author
David Yamnitsky
committed
fix use of approx in test_axis_chunks_iter_mut
1 parent f586ba3 commit f9ac9d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/par_rayon.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ fn test_axis_chunks_iter() {
7373
}
7474

7575
#[test]
76+
#[cfg(feature = "approx")]
7677
fn test_axis_chunks_iter_mut() {
78+
use approx::assert_abs_diff_eq;
7779
let mut a = Array::linspace(0., 1.0f64, M * N)
7880
.into_shape((M, N))
7981
.unwrap();
@@ -82,5 +84,5 @@ fn test_axis_chunks_iter_mut() {
8284
.into_par_iter()
8385
.for_each(|mut v| v.mapv_inplace(|x| x.exp()));
8486
println!("{:?}", a.slice(s![..10, ..5]));
85-
assert!(a.all_close(&b, 0.001));
87+
assert_abs_diff_eq!(a, b, epsilon = 0.001);
8688
}

0 commit comments

Comments
 (0)