From b5ce522dda6008770b4b9d46281e1da5290c9be9 Mon Sep 17 00:00:00 2001 From: Thibault Hallouin <thibault.hallouin@inrae.fr> Date: Wed, 4 May 2022 13:30:02 +0200 Subject: [PATCH] simplify docstring for what are only utilities --- include/evalhyd/utils.hpp | 46 +++++++-------------------------------- 1 file changed, 8 insertions(+), 38 deletions(-) diff --git a/include/evalhyd/utils.hpp b/include/evalhyd/utils.hpp index 3a83c65..d8bbb81 100644 --- a/include/evalhyd/utils.hpp +++ b/include/evalhyd/utils.hpp @@ -11,25 +11,10 @@ namespace evalhyd { namespace utils { - /// Determine whether flows are greater than given threshold(s) - /// - /// Streamflow data is always expected as a 2D array (even if only for - /// one time series). Threshold(s) given is (are) always expected as a - /// 1D array (even if only one threshold is given). A 3D array is - /// returned whose first two dimensions are of the same sizes as the - /// streamflow data and whose third dimension is of size equal to the - /// number of thresholds given. The returned array contains ones where - /// the threshold is exceeded, and zeros otherwise. - /// - /// \param [in] q: - /// 2D array of streamflow data. - /// shape: (1+, time) - /// \param [in] thr: - /// 1D array of streamflow threshold(s). - /// shape: (thresholds,) - /// \return - /// 3D array of ones and zeros. - /// shape: (thresholds, 1+, time) + // determine whether flows `q` are greater than given threshold(s) `thr` + // q shape: (1+, time) + // thr shape: (thresholds,) + // returned shape: (thresholds, 1+, time) xt::xtensor<double, 3> is_above_threshold( const xt::xtensor<double, 2>& q, const xt::xtensor<double, 1>& thr @@ -39,25 +24,10 @@ namespace evalhyd return q >= xt::view(thr, xt::all(), xt::newaxis(), xt::newaxis()); } - /// Determine whether flows are strictly lower than given threshold(s) - /// - /// Streamflow data is always expected as a 2D array (even if only for - /// one time series). Threshold(s) given is (are) always expected as a - /// 1D array (even if only one threshold is given). A 3D array is - /// returned whose first two dimensions are of the same sizes as the - /// streamflow data and whose third dimension is of size equal to the - /// number of thresholds given. The returned array contains ones where - /// the threshold is strictly not exceeded, and zeros otherwise. - /// - /// \param [in] q: - /// 2D array of streamflow data. - /// shape: (1+, time) - /// \param [in] thr: - /// 1D array of streamflow threshold(s). - /// shape: (thresholds,) - /// \return - /// 3D array of ones and zeros. - /// shape: (thresholds, 1+, time) + // determine whether flows `q` are strictly lower than given threshold(s) `thr` + // q shape: (1+, time) + // thr shape: (thresholds,) + // returned shape: (thresholds, 1+, time) xt::xtensor<double, 3> is_below_threshold( const xt::xtensor<double, 2>& q, const xt::xtensor<double, 1>& thr -- GitLab