Skip to content

Commit f8b1801

Browse files
committed
all I did was specify the default values...
1 parent ed609f1 commit f8b1801

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_flash.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
from pyxlma.lmalib.flash.properties import *
88

99

10-
def compare_dataarrays(tocheck, truth, var):
10+
def compare_dataarrays(tocheck, truth, var, rtol=1.e-5, atol=1.e-8):
1111
"""Compare two dataarrays"""
1212
if truth[var].data.dtype == 'datetime64[ns]' or truth[var].data.dtype == 'timedelta64[ns]':
1313
if tocheck[var].data.dtype == 'float64':
1414
truth[var].data = truth[var].data.astype(float)/1e9
15-
np.testing.assert_allclose(tocheck[var].data.astype(float), truth[var].data.astype(float))
15+
np.testing.assert_allclose(tocheck[var].data.astype(float), truth[var].data.astype(float), rtol=rtol, atol=atol, equal_nan=True)
1616
else:
17-
np.testing.assert_allclose(tocheck[var].data, truth[var].data)
17+
np.testing.assert_allclose(tocheck[var].data, truth[var].data, rtol=rtol, atol=atol, equal_nan=True)
1818

1919

2020
def test_cluster_flashes():

0 commit comments

Comments
 (0)