Commit 1e345e40 authored by Thibault Hallouin's avatar Thibault Hallouin
Browse files

document conditional masking functionality

No related merge requests found
Pipeline #38891 passed with stage
in 2 minutes and 8 seconds
Showing with 53 additions and 2 deletions
+53 -2
...@@ -87,6 +87,26 @@ PYBIND11_MODULE(evalhyd, m) ...@@ -87,6 +87,26 @@ PYBIND11_MODULE(evalhyd, m)
`Pushpalatha et al. (2012) `Pushpalatha et al. (2012)
<https://doi.org/10.1016/j.jhydrol.2011.11.055>`_. <https://doi.org/10.1016/j.jhydrol.2011.11.055>`_.
t_msk: `numpy.ndarray`, optional
1D array of mask(s) used to generate temporal subsets of
the whole streamflow time series (where True/False is used for
the time steps to include/discard in a given subset). If not
provided and neither is *m_cdt*, no subset is performed. If
provided, masks must feature the same number of dimensions as
observations and predictions, and it must broadcastable with
both of them.
shape: (time,)
m_cdt: `numpy.ndarray`, optional
1D array of masking condition(s) to use to generate
temporal subsets. Each condition consists in a string and
can be specified on observed streamflow values or on time
indices. If provided in combination with *t_msk*, the latter
takes precedence. If not provided and neither is *t_msk*, no
subset is performed. If provided, only one condition per
time series of observations can be provided.
shape: (1,)
:Returns: :Returns:
`List[numpy.ndarray]` `List[numpy.ndarray]`
...@@ -164,6 +184,26 @@ PYBIND11_MODULE(evalhyd, m) ...@@ -164,6 +184,26 @@ PYBIND11_MODULE(evalhyd, m)
`Pushpalatha et al. (2012) `Pushpalatha et al. (2012)
<https://doi.org/10.1016/j.jhydrol.2011.11.055>`_. <https://doi.org/10.1016/j.jhydrol.2011.11.055>`_.
t_msk: `numpy.ndarray`, optional
2D array of mask(s) used to generate temporal subsets of
the whole streamflow time series (where True/False is used for
the time steps to include/discard in a given subset). If not
provided and neither is *m_cdt*, no subset is performed. If
provided, masks must feature the same number of dimensions as
observations and predictions, and it must broadcastable with
both of them.
shape: (1+, time)
m_cdt: `numpy.ndarray`, optional
2D array of masking condition(s) to use to generate
temporal subsets. Each condition consists in a string and
can be specified on observed streamflow values or on time
indices. If provided in combination with *t_msk*, the latter
takes precedence. If not provided and neither is *t_msk*, no
subset is performed. If provided, only one condition per
time series of observations can be provided.
shape: (1+, 1)
:Returns: :Returns:
`List[numpy.ndarray]` `List[numpy.ndarray]`
...@@ -212,14 +252,25 @@ PYBIND11_MODULE(evalhyd, m) ...@@ -212,14 +252,25 @@ PYBIND11_MODULE(evalhyd, m)
shape: (thresholds,) shape: (thresholds,)
t_msk: `numpy.ndarray`, optional t_msk: `numpy.ndarray`, optional
2D array of masks to generate temporal subsets of the whole 3D array of masks to generate temporal subsets of the whole
streamflow time series (where True/False is used for the streamflow time series (where True/False is used for the
time steps to include/discard in a given subset). If not time steps to include/discard in a given subset). If not
provided, no subset is performed and only one set of metrics provided, no subset is performed and only one set of metrics
is returned corresponding to the whole time series. If is returned corresponding to the whole time series. If
provided, as many sets of metrics are returned as they are provided, as many sets of metrics are returned as they are
masks provided. masks provided.
shape: (subsets, time) shape: (sites, subsets, time)
m_cdt: `numpy.ndarray`, optional
2D array of conditions to generate temporal subsets. Each
condition consists in a string and can be specified on
observed streamflow values or on time indices. If provided
in combination with t_msk, the latter takes precedence. If
not provided and neither is t_msk, no subset is performed
and only one set of metrics is returned corresponding to
the whole time series. If provided, as many sets of metrics
are returned as they are conditions provided.
shape: (sites, subsets)
:Returns: :Returns:
......
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