From fa36d5c033162efa3e46caf54a9e072cbc5f3f6f Mon Sep 17 00:00:00 2001 From: fbourgin <francois.bourgin@inrae.fr> Date: Thu, 24 Apr 2025 13:04:35 +0200 Subject: [PATCH] wip - debug --- .../evalhyd/detail/probabilist/intervals.hpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/include/evalhyd/detail/probabilist/intervals.hpp b/include/evalhyd/detail/probabilist/intervals.hpp index 19577cf..1033e5c 100644 --- a/include/evalhyd/detail/probabilist/intervals.hpp +++ b/include/evalhyd/detail/probabilist/intervals.hpp @@ -69,19 +69,20 @@ namespace evalhyd auto a = xt::broadcast(xt::view(quantiles, i), std::vector<std::size_t>({q_lvl.size(), 2})); auto b = xt::broadcast(q_lvl, std::vector<std::size_t>({2, q_lvl.size()})); auto res = xt::where(xt::equal(a, xt::transpose(b))); - //if (res.size() != 2) - //{ - // throw std::runtime_error( - // "interval-based metric requested, " - // "but *c_lvl* not matching *q_lvl" - // ); - //} else - //{ + std::cout << "res: " << res << std::endl; + if (res.size() != 2) + { + throw std::runtime_error( + "interval-based metric requested, " + "but *c_lvl* not matching *q_lvl" + ); + } else + { xt::view(itv_bnds, xt::all(), xt::all(), i, 0, xt::all()) = xt::view(q_prd, xt::all(), xt::all(), 0, xt::all()); xt::view(itv_bnds, xt::all(), xt::all(), i, 1, xt::all()) = xt::view(q_prd, xt::all(), xt::all(), 1, xt::all()); - //} + } } } else -- GitLab