Commit 67ada20f authored by Thibault Hallouin's avatar Thibault Hallouin
Browse files

fix paths to datetime files for bootstrap tests

1 merge request!2refactor structure and proper cmake instructions
Pipeline #42136 passed with stage
in 2 minutes and 5 seconds
Showing with 6 additions and 6 deletions
+6 -6
...@@ -334,16 +334,16 @@ TEST(DeterministTests, TestBootstrap) ...@@ -334,16 +334,16 @@ TEST(DeterministTests, TestBootstrap)
// read in data // read in data
std::ifstream ifs; std::ifstream ifs;
ifs.open("./data/q_obs_1yr.csv"); ifs.open(EVALHYD_DATA_DIR "/q_obs_1yr.csv");
xt::xtensor<std::string, 1> x_dts = xt::squeeze(xt::load_csv<std::string>(ifs, ',', 0, 1)); xt::xtensor<std::string, 1> x_dts = xt::squeeze(xt::load_csv<std::string>(ifs, ',', 0, 1));
ifs.close(); ifs.close();
std::vector<std::string> datetimes (x_dts.begin(), x_dts.end()); std::vector<std::string> datetimes (x_dts.begin(), x_dts.end());
ifs.open("./data/q_obs_1yr.csv"); ifs.open(EVALHYD_DATA_DIR "/q_obs_1yr.csv");
xt::xtensor<double, 1> observed = xt::squeeze(xt::load_csv<double>(ifs, ',', 1)); xt::xtensor<double, 1> observed = xt::squeeze(xt::load_csv<double>(ifs, ',', 1));
ifs.close(); ifs.close();
ifs.open("./data/q_prd_1yr.csv"); ifs.open(EVALHYD_DATA_DIR "/q_prd_1yr.csv");
xt::xtensor<double, 2> predicted = xt::load_csv<double>(ifs, ',', 1); xt::xtensor<double, 2> predicted = xt::load_csv<double>(ifs, ',', 1);
ifs.close(); ifs.close();
......
...@@ -397,16 +397,16 @@ TEST(ProbabilistTests, TestBootstrap) ...@@ -397,16 +397,16 @@ TEST(ProbabilistTests, TestBootstrap)
// read in data // read in data
std::ifstream ifs; std::ifstream ifs;
ifs.open("./data/q_obs_1yr.csv"); ifs.open(EVALHYD_DATA_DIR "/q_obs_1yr.csv");
xt::xtensor<std::string, 1> x_dts = xt::squeeze(xt::load_csv<std::string>(ifs, ',', 0, 1)); xt::xtensor<std::string, 1> x_dts = xt::squeeze(xt::load_csv<std::string>(ifs, ',', 0, 1));
ifs.close(); ifs.close();
std::vector<std::string> datetimes (x_dts.begin(), x_dts.end()); std::vector<std::string> datetimes (x_dts.begin(), x_dts.end());
ifs.open("./data/q_obs_1yr.csv"); ifs.open(EVALHYD_DATA_DIR "/q_obs_1yr.csv");
xt::xtensor<double, 1> observed = xt::squeeze(xt::load_csv<double>(ifs, ',', 1)); xt::xtensor<double, 1> observed = xt::squeeze(xt::load_csv<double>(ifs, ',', 1));
ifs.close(); ifs.close();
ifs.open("./data/q_prd_1yr.csv"); ifs.open(EVALHYD_DATA_DIR "/q_prd_1yr.csv");
xt::xtensor<double, 2> predicted = xt::load_csv<double>(ifs, ',', 1); xt::xtensor<double, 2> predicted = xt::load_csv<double>(ifs, ',', 1);
ifs.close(); ifs.close();
......
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