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

fix wrong check to allow condition on streamflow predictions

Showing with 3 additions and 4 deletions
+3 -4
......@@ -21,7 +21,6 @@
#include "maths.hpp"
namespace eh = evalhyd;
typedef std::map<std::string, std::vector<std::vector<std::string>>> msk_tree;
......@@ -205,7 +204,7 @@ namespace evalhyd
}
else if (var == "q_prd_median")
{
if (q_prd.size() < 1)
if (q_prd.shape(0) == 1)
{
throw std::runtime_error(
"condition on streamflow predictions "
......@@ -219,7 +218,7 @@ namespace evalhyd
else
{
// i.e. (var == "q_prd_mean")
if (q_prd.size() < 1)
if (q_prd.shape(0) == 1)
{
throw std::runtime_error(
"condition on streamflow predictions "
......@@ -251,7 +250,7 @@ namespace evalhyd
}
else // (str == "quantile")
{
return eh::maths::quantile(q, std::stod(num));
return evalhyd::maths::quantile(q, std::stod(num));
}
};
......
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