Skip to content
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

Add weighted() function #14

Closed
jukent opened this issue Sep 16, 2021 · 2 comments · Fixed by #12
Closed

Add weighted() function #14

jukent opened this issue Sep 16, 2021 · 2 comments · Fixed by #12

Comments

@jukent
Copy link
Contributor

jukent commented Sep 16, 2021

One card on the Trello board is to add weighted.mean() method to the Collection object. On the Xarray Documentation I see that we have 4 similar functions (weighted(), weighted.mean(), weighted.sum(), and weighted.sum_of_weights()).

In practice it seems that mean() is just called on an already weighted object. Do we want to add some sort of Decorator to a Collection object to indicate that it is weighted - or just allow someone to call mean on anything?

Also I am designing the function to go through every dataset in the collection, and create a collection of weighted datasets. I think this is the intended behavior (we're not trying to combine the different datasets here).

@jukent
Copy link
Contributor Author

jukent commented Sep 16, 2021

@jukent
Copy link
Contributor Author

jukent commented Sep 20, 2021

I have a question about the intended use. Currently the PR #12 uses the same weights for every dataset in the collection, do we want to use different weights for different datasets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant