From bd872cf48af4331b2792c3f2e6990c5c2ba1a995 Mon Sep 17 00:00:00 2001 From: Tom Vo Date: Tue, 3 Sep 2024 11:35:08 -0700 Subject: [PATCH] Fix docstring --- xcdat/temporal.py | 57 +++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/xcdat/temporal.py b/xcdat/temporal.py index 9f991301..c7f24a54 100644 --- a/xcdat/temporal.py +++ b/xcdat/temporal.py @@ -334,7 +334,7 @@ def group_average( min_weight : float | None, optional Fraction of data coverage (i..e, weight) needed to return a temporal average value. Value must range from 0 to 1, by default - None ((equivalent to ``min_weight=0.0``). + None (equivalent to ``min_weight=0.0``). Returns ------- @@ -907,36 +907,31 @@ def _set_arg_attrs( ): """Validates method arguments and sets them as object attributes. - Parameters - ---------- - mode : Mode - The mode for temporal averaging. - freq : Frequency - The frequency of time to group by. - weighted : bool - Calculate averages using weights. - season_config: Optional[SeasonConfigInput] - A dictionary for "season" frequency configurations. If configs for - predefined seasons are passed, configs for custom seasons are - ignored and vice versa, by default DEFAULT_SEASON_CONFIG. - min_weight : float | None, optional - Fraction of data coverage (i..e, weight) needed to return a - <<<<<<< Updated upstream - spatial average value. Value must range from 0 to 1, by default None - (equivalent to ``min_weight=0.0``). - ======= - temporal average value. Value must range from 0 to 1, by default - None ((equivalent to ``min_weight=0.0``). - >>>>>>> Stashed changes - - Raises - ------ - KeyError - If the Dataset does not have a time dimension. - ValueError - If an incorrect ``freq`` arg was passed. - ValueError - If an incorrect ``dec_mode`` arg was passed. + Parameters + ---------- + mode : Mode + The mode for temporal averaging. + freq : Frequency + The frequency of time to group by. + weighted : bool + Calculate averages using weights. + season_config: Optional[SeasonConfigInput] + A dictionary for "season" frequency configurations. If configs for + predefined seasons are passed, configs for custom seasons are + ignored and vice versa, by default DEFAULT_SEASON_CONFIG. + min_weight : float | None, optional + Fraction of data coverage (i..e, weight) needed to return a + temporal average value. Value must range from 0 to 1, by default + None (equivalent to ``min_weight=0.0``). + + Raises + ------ + KeyError + If the Dataset does not have a time dimension. + ValueError + If an incorrect ``freq`` arg was passed. + ValueError + If an incorrect ``dec_mode`` arg was passed. """ # General configuration attributes. if mode not in list(MODES):