From c0ed1559bb5c35ca883984a2952d6fce80d58b49 Mon Sep 17 00:00:00 2001 From: Thibault Hallouin <thibault.hallouin@inrae.fr> Date: Tue, 23 Aug 2022 14:52:59 +0200 Subject: [PATCH] fix bug in unit test where region with NaN not fully discarded --- tests/test_determinist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_determinist.cpp b/tests/test_determinist.cpp index 89c213e..1980c4d 100644 --- a/tests/test_determinist.cpp +++ b/tests/test_determinist.cpp @@ -204,12 +204,12 @@ TEST(DeterministTests, TestMissingData) for (int m = 0; m < metrics.size(); m++) { for (int p = 0; p < predicted.shape(0); p++) { - // compute metrics on subset of observations and predictions - // (i.e. eliminating region with NaN in observations manually) + // compute metrics on subset of observations and predictions (i.e. + // eliminating region with NaN in observations or predictions manually) xt::xtensor<double, 1> obs = - xt::view(observed, 0, xt::range(3*(p+1), _)); + xt::view(observed, 0, xt::range(20+(3*(p+1)), _)); xt::xtensor<double, 1> prd = - xt::view(predicted, p, xt::range(3*(p+1), _)); + xt::view(predicted, p, xt::range(20+(3*(p+1)), _)); std::vector<xt::xarray<double>> metrics_sbs = evalhyd::evald<xt::xtensor<double, 1>>( -- GitLab