Commit 0afedc4d authored by Thibault Hallouin's avatar Thibault Hallouin
Browse files

update to latest evalhyd version

which includes the explicit assignment of NaN in outputs where threshold
is not provided by user for given site (i.e. set to NaN)
No related merge requests found
Pipeline #38409 passed with stage
in 1 minute and 37 seconds
Showing with 8 additions and 6 deletions
+8 -6
Subproject commit 0cb58bb553733c00eed1930b62b7636899819b54 Subproject commit a2957cb3f6e674df6cf5e148870f74c9d53251b4
...@@ -16,17 +16,19 @@ class TestMetrics(unittest.TestCase): ...@@ -16,17 +16,19 @@ class TestMetrics(unittest.TestCase):
expected_thr = { expected_thr = {
'BS': 'BS':
[[[[0.1081672, 0.073954980, 0.08681672]]]], [[[[0.1081672, 0.073954980, 0.08681672, numpy.nan]]]],
'BSS': 'BSS':
[[[[0.56240422, 0.66612211, 0.56288391]]]], [[[[0.56240422, 0.66612211, 0.56288391, numpy.nan]]]],
'BS_CRD': 'BS_CRD':
[[[[[0.01335634, 0.15237434, 0.24718520], [[[[[0.01335634, 0.15237434, 0.24718520],
[0.00550861, 0.15305671, 0.22150309], [0.00550861, 0.15305671, 0.22150309],
[0.00753750, 0.11933328, 0.19861250]]]]], [0.00753750, 0.11933328, 0.19861250],
[numpy.nan, numpy.nan, numpy.nan]]]]],
'BS_LBD': 'BS_LBD':
[[[[[0.01244569, 0.14933386, 0.24505537], [[[[[0.01244569, 0.14933386, 0.24505537],
[0.00801337, 0.14745568, 0.21339730], [0.00801337, 0.14745568, 0.21339730],
[0.01719462, 0.10479711, 0.17441921]]]]] [0.01719462, 0.10479711, 0.17441921],
[numpy.nan, numpy.nan, numpy.nan]]]]]
} }
expected_qtl = { expected_qtl = {
...@@ -38,7 +40,7 @@ class TestMetrics(unittest.TestCase): ...@@ -38,7 +40,7 @@ class TestMetrics(unittest.TestCase):
} }
def test_threshold_metrics(self): def test_threshold_metrics(self):
thr = numpy.array([[690, 534, 445]]) thr = numpy.array([[690, 534, 445, numpy.nan]])
for metric in self.expected_thr.keys(): for metric in self.expected_thr.keys():
with self.subTest(metric=metric): with self.subTest(metric=metric):
numpy.testing.assert_almost_equal( numpy.testing.assert_almost_equal(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment