Skip to content

Commit

Permalink
Add tolerance to asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
finsberg committed Nov 4, 2023
1 parent 4b92da4 commit 62c3c0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ def figure1(
fig.savefig(fname, bbox_inches="tight", dpi=500)
print(f"Save figure 1 to {fname}")

assert np.isclose(results[0].v.max(), 1.102052889)
assert np.isclose(results[0].w.max(), 0.668941310)
assert np.isclose(results[0].v.max(), 1.102052889, rtol=1e-6)
assert np.isclose(results[0].w.max(), 0.668941310, rtol=1e-6)


def table1(results: list[Result], outfile: Path):
Expand Down

0 comments on commit 62c3c0c

Please sign in to comment.