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

simplify docstring for what are only utilities

Showing with 8 additions and 38 deletions
+8 -38
...@@ -11,25 +11,10 @@ namespace evalhyd ...@@ -11,25 +11,10 @@ namespace evalhyd
{ {
namespace utils namespace utils
{ {
/// Determine whether flows are greater than given threshold(s) // determine whether flows `q` are greater than given threshold(s) `thr`
/// // q shape: (1+, time)
/// Streamflow data is always expected as a 2D array (even if only for // thr shape: (thresholds,)
/// one time series). Threshold(s) given is (are) always expected as a // returned shape: (thresholds, 1+, time)
/// 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)
xt::xtensor<double, 3> is_above_threshold( xt::xtensor<double, 3> is_above_threshold(
const xt::xtensor<double, 2>& q, const xt::xtensor<double, 2>& q,
const xt::xtensor<double, 1>& thr const xt::xtensor<double, 1>& thr
...@@ -39,25 +24,10 @@ namespace evalhyd ...@@ -39,25 +24,10 @@ namespace evalhyd
return q >= xt::view(thr, xt::all(), xt::newaxis(), xt::newaxis()); return q >= xt::view(thr, xt::all(), xt::newaxis(), xt::newaxis());
} }
/// Determine whether flows are strictly lower than given threshold(s) // determine whether flows `q` are strictly lower than given threshold(s) `thr`
/// // q shape: (1+, time)
/// Streamflow data is always expected as a 2D array (even if only for // thr shape: (thresholds,)
/// one time series). Threshold(s) given is (are) always expected as a // returned shape: (thresholds, 1+, time)
/// 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)
xt::xtensor<double, 3> is_below_threshold( xt::xtensor<double, 3> is_below_threshold(
const xt::xtensor<double, 2>& q, const xt::xtensor<double, 2>& q,
const xt::xtensor<double, 1>& thr const xt::xtensor<double, 1>& thr
......
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