Skip to content

Commit

Permalink
Modfy executeOpenfastLinearRegressionCase.py to skip comparison of nu…
Browse files Browse the repository at this point in the history
…mbers less than 5e-5
  • Loading branch information
deslaughter committed Aug 29, 2024
1 parent 48a9e87 commit f93ef05
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions reg_tests/executeOpenfastLinearRegressionCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f93ef05

Please sign in to comment.