Skip to content

Commit

Permalink
Add averages with time dimension removed (#236)
Browse files Browse the repository at this point in the history
- Add new `.average()` method to `TemporalAccessor`
- Rename previous `.average()` to `.group_average()`
- Refactor many private methods in `TemporalAccessor` class
  - Rename methods and variables, update docstrings
  - Refactor `._validate_weights()` for a significant performance increase of about 4-5x (for the monthly Dataset I was testing on)
- Remove redundant tests for private methods
  • Loading branch information
tomvothecoder authored May 23, 2022
1 parent 4a35d6a commit 112eb58
Show file tree
Hide file tree
Showing 4 changed files with 2,373 additions and 3,290 deletions.
3 changes: 2 additions & 1 deletion .vscode/xcdat.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
}
],
"settings": {
"autoDocstring.docstringFormat": "numpy"
"autoDocstring.docstringFormat": "numpy",
"editor.formatOnSave": true
}
}
1 change: 1 addition & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Methods
Dataset.bounds.add_missing_bounds
Dataset.spatial.average
Dataset.temporal.average
Dataset.temporal.group_average
Dataset.temporal.climatology
Dataset.temporal.departures
Dataset.temporal.center_times
Expand Down
Loading

0 comments on commit 112eb58

Please sign in to comment.