diff --git a/src/dense/tools.rs b/src/dense/tools.rs index 23bb962..07c8a52 100644 --- a/src/dense/tools.rs +++ b/src/dense/tools.rs @@ -109,7 +109,7 @@ macro_rules! assert_array_relative_eq { use approx::assert_relative_eq; assert_eq!($expected_array.shape(), $actual_array.shape()); for (actual, expected) in $actual_array.iter().zip($expected_array.iter()) { - assert_relative_eq!(actual, expected, epsilon = $epsilon); + assert_relative_eq!(actual, expected, max_relative = $epsilon); } }}; } diff --git a/tests/array_operations.rs b/tests/array_operations.rs index a9bc3ae..6ccd3ae 100644 --- a/tests/array_operations.rs +++ b/tests/array_operations.rs @@ -562,5 +562,5 @@ fn test_integer_array() { mat_mul_test_impl!(f64, 1E-14); mat_mul_test_impl!(f32, 1E-5); -mat_mul_test_impl!(c32, 1E-5); -mat_mul_test_impl!(c64, 1E-14); +mat_mul_test_impl!(c32, 1E-4); +mat_mul_test_impl!(c64, 1E-12); diff --git a/tests/linalg.rs b/tests/linalg.rs index bfc923e..b7feb34 100644 --- a/tests/linalg.rs +++ b/tests/linalg.rs @@ -162,7 +162,7 @@ macro_rules! impl_lu_tests { impl_lu_tests!(f64, 1E-12); impl_lu_tests!(f32, 1E-5); impl_lu_tests!(c64, 1E-12); -impl_lu_tests!(c32, 1E-5); +impl_lu_tests!(c32, 1E-4); macro_rules! impl_pinv_tests { ($scalar:ty, $tol:expr) => { @@ -322,10 +322,10 @@ macro_rules! implement_qr_tests { }; } -implement_qr_tests!(f32, 1E-6); -implement_qr_tests!(f64, 1E-12); -implement_qr_tests!(c32, 1E-6); -implement_qr_tests!(c64, 1E-12); +implement_qr_tests!(f32, 1E-5); +implement_qr_tests!(f64, 1E-10); +implement_qr_tests!(c32, 1E-4); +implement_qr_tests!(c64, 1E-10); macro_rules! impl_tests { ($scalar:ty, $tol:expr) => { @@ -443,7 +443,7 @@ macro_rules! impl_tests { }; } -impl_tests!(f32, 1E-5); -impl_tests!(f64, 1E-12); -impl_tests!(c32, 1E-5); -impl_tests!(c64, 1E-12); +impl_tests!(f32, 1E-4); +impl_tests!(f64, 1E-11); +impl_tests!(c32, 1E-4); +impl_tests!(c64, 1E-10);