Skip to content

Commit

Permalink
Fix docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvothecoder committed Sep 4, 2024
1 parent 0be9581 commit bd872cf
Showing 1 changed file with 26 additions and 31 deletions.
57 changes: 26 additions & 31 deletions xcdat/temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit bd872cf

Please sign in to comment.