From 5e9c88e05f1ab1e50f6194e2fd08341e53979b11 Mon Sep 17 00:00:00 2001
From: Thibault Hallouin <thibault.hallouin@inrae.fr>
Date: Mon, 16 Jan 2023 09:43:03 +0100
Subject: [PATCH] fix wrong ranks in contingency metrics

---
 include/evalhyd/detail/probabilist/contingency.hpp | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/include/evalhyd/detail/probabilist/contingency.hpp b/include/evalhyd/detail/probabilist/contingency.hpp
index dbae492..13f79ab 100644
--- a/include/evalhyd/detail/probabilist/contingency.hpp
+++ b/include/evalhyd/detail/probabilist/contingency.hpp
@@ -46,7 +46,7 @@ namespace evalhyd
             ///     Alerts based on forecast.
             ///     shape: (sites, lead times, levels, thresholds, time)
             inline xt::xtensor<double, 5> calc_a_k(
-                    const xt::xtensor<double, 3>& sum_f_k,
+                    const xt::xtensor<double, 4>& sum_f_k,
                     std::size_t n_mbr
             )
             {
@@ -235,10 +235,6 @@ namespace evalhyd
 
         namespace metrics
         {
-            // -----------------------------------------------------------------
-            // Accuracy
-            // -----------------------------------------------------------------
-
             namespace detail
             {
                 template <class XD2>
@@ -256,7 +252,7 @@ namespace evalhyd
                 )
                 {
                     // initialise output variable
-                    xt::xtensor<double, 4> METRIC =
+                    xt::xtensor<double, 6> METRIC =
                             xt::zeros<double>({n_sit, n_ldt, n_msk, n_exp,
                                                n_mbr + 1, n_thr});
 
-- 
GitLab