From 9d193d808286bde4ce57b72d97af4547d2c2b3c7 Mon Sep 17 00:00:00 2001 From: "Eric T. Johnson" Date: Fri, 18 Oct 2024 14:13:30 -0400 Subject: [PATCH] Make absolute tolerance stricter for regression tests --- pyro/util/compare.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyro/util/compare.py b/pyro/util/compare.py index 976375c1a..9f0b2d19a 100755 --- a/pyro/util/compare.py +++ b/pyro/util/compare.py @@ -19,7 +19,7 @@ "varerr": "one or more variables don't agree"} -def compare(data1, data2, rtol=1.e-12): +def compare(data1, data2, rtol=1.e-12, atol=1.e-13): """ given two CellCenterData2d objects, compare the data, zone-by-zone and output any errors @@ -59,7 +59,7 @@ def compare(data1, data2, rtol=1.e-12): else: print(f"{name:20s} absolute error = {abs_err:10.10g}") - if not np.allclose(d1.v(), d2.v(), rtol=rtol): + if not np.allclose(d1.v(), d2.v(), rtol=rtol, atol=atol): result = "varerr" return result