From f93ef0504765569fd7c0038ada621d0f64d99b38 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 29 Aug 2024 18:41:46 +0000 Subject: [PATCH] Modfy executeOpenfastLinearRegressionCase.py to skip comparison of numbers less than 5e-5 --- reg_tests/executeOpenfastLinearRegressionCase.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reg_tests/executeOpenfastLinearRegressionCase.py b/reg_tests/executeOpenfastLinearRegressionCase.py index fbdbe635e..f8c2aa191 100644 --- a/reg_tests/executeOpenfastLinearRegressionCase.py +++ b/reg_tests/executeOpenfastLinearRegressionCase.py @@ -292,6 +292,9 @@ def indent(msg, sindent='\t'): # Loop through elements where Mloc is not within tolerance of Mbas # Retest to get error message for n, (i,j) in enumerate(zip(*np.where(M_in_tol == False)), 1): + # Skip comparisons of really small numbers + if np.abs(Mloc[i,j]) < 5e-5 and np.abs(Mloc[i,j]) < 5e-5: + continue try: np.testing.assert_allclose(Mloc[i,j], Mbas[i,j], rtol=rtol, atol=atol) except Exception as e: