-
Notifications
You must be signed in to change notification settings - Fork 281
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
Smarter weighted aggregation #5082
Labels
Comments
This was referenced Nov 24, 2022
Since #3173 is closed I will open a pull request soon (need to add some test before that). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
✨ Feature Request
It would be nice to use cubes or cell_measures as weights in weighted aggregation, e.g.,
or
which automatically handles unit conversions (e.g., multiply by
m2
for area-weighted sums).Motivation
Currently, weights for aggregation need to be arrays. Thus, units for operations like area-weighted sums are not handled correctly, which requires extra code.
Additional context
If this is something that's interesting, I can open a pull request. I already have working prototype in this branch. The main feature is a
Weights
class that inherits fromnp.ndarray
; thus, changes in the code base are minimal.`Weights` class
The text was updated successfully, but these errors were encountered: