diff --git a/include/evalhyd/utils.hpp b/include/evalhyd/utils.hpp index 3a83c6550218cc7d86ad49d5528a09b2bfadd095..d8bbb815fc050877bfcb072772cd4050e775fb17 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