diff --git a/include/evalhyd/detail/probabilist/intervals.hpp b/include/evalhyd/detail/probabilist/intervals.hpp index 19577cf9e7398db8674a1f5b0b9020cc6b29f21d..1033e5c25c289f171b1bc99e01bb51b415e808f1 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