-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow smarter weights (cubes, coordinates, cell measures, or ancillary variables) for aggregation #5084
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3b05f05
to
0352241
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #5084 +/- ##
==========================================
+ Coverage 89.24% 89.26% +0.02%
==========================================
Files 88 88
Lines 22191 22233 +42
Branches 4855 4863 +8
==========================================
+ Hits 19805 19847 +42
Misses 1641 1641
Partials 745 745
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Thanks for reviewing @lbdreyer! I think I addressed all your comments, let me know if you need anything else. 👍 About the line in the I copy-pasted this from https://numpy.org/doc/stable/user/basics.subclassing.html#slightly-more-realistic-example-attribute-added-to-existing-array. However, if I understand the description of the |
The linkcheck reports that the Twitter link is broken
For me that link works. Not sure if this is related to this PR. |
I just re-ran the link check and it’s OK now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the changes @schlunma !
I just have a couple of small fixes but otherwise this is very close!
I agree. The numpy docs imply that of the three ways that
Only the explicit constructor may have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant! Thanks for all your work on this PR @schlunma !
I have no other comments so this can go in!
* upstream/main: (23 commits) Lockfiles and pydata-sphinx-theme fix (SciTools#5188) Allow smarter weights (cubes, coordinates, cell measures, or ancillary variables) for aggregation (SciTools#5084) removed cell measure mask check and error (SciTools#5181) Updated environment lockfiles (SciTools#5177) Lazy weighted RMS calculation (SciTools#5017) Add coverage badge to README.md (SciTools#5176) Add coverage testing (SciTools#4765) Whats new updates for v3.4.1 . NetCDF thread safety take two (SciTools#5095) Updated environment lockfiles (SciTools#5163) Plugin support (SciTools#5144) Expand scope of common contributor links (SciTools#5159) Replace apparently retired UDUNITS documentation link. (SciTools#5153) [pre-commit.ci] pre-commit autoupdate (SciTools#5150) Fixing typo's in Gitwash. (SciTools#5145) add readme #showyourstripes (SciTools#5141) [pre-commit.ci] pre-commit autoupdate (SciTools#5143) Iris ❤ Xarray docs page. (SciTools#5025) [pre-commit.ci] pre-commit autoupdate (SciTools#5136) Updated citation (SciTools#5116) ...
🚀 Pull Request
Description
This PR allows using cubes, coordinates, cell measures, or ancillary variables as weights.
Example:
or
This automatically handles potential unit conversions (e.g., multiply by
m2
for area-weighted sums).Closes #5082.
Consult Iris pull request check list