Commit a81bf8f4 authored by Thibault Hallouin's avatar Thibault Hallouin
Browse files

fix broadcasting problem in calculating alerts

only showing up when multiple lead times provided
Showing with 4 additions and 3 deletions
+4 -3
......@@ -56,9 +56,10 @@ namespace evalhyd
auto alert_lvl = xt::arange<double>(double(n_mbr + 1));
// determine whether forecast yield alert
return sum_f_k >=
xt::view(alert_lvl, xt::newaxis(), xt::newaxis(),
xt::all(), xt::newaxis(), xt::newaxis());
return xt::view(sum_f_k, xt::all(), xt::all(), xt::newaxis(),
xt::all(), xt::all())
>= xt::view(alert_lvl, xt::newaxis(), xt::newaxis(),
xt::all(), xt::newaxis(), xt::newaxis());
}
/// Determine hits ('a' in contingency table).
......
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