-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
[MRG]: Fweight and aweight support for np.var #5930
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
Conversation
bump? |
@@ -44,6 +44,45 @@ | |||
] | |||
|
|||
|
|||
def _product_fweights_aweights(fweights, aweights, shape): | |||
"""Get the product and validate fweights and aweights. | |||
Used in weighted variance and cobariance calculation. |
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.
typo cobariance
☔ The latest upstream changes (presumably #4619) made this pull request unmergeable. Please resolve the merge conflicts. |
What is the status of this PR? |
hmm, this never got followed up on. The two types of weights are weird imho. Also in |
@rgommers IIRC, there was quite a long discussion about the two weights. |
maybe we can find it and document it properly then? it doesn't make too much sense right now imho ..... |
I can't find it with a quick search, but there was this, that tickles my memory. |
The previous discussion can be found here: #4960 |
So was this abandoned since there is something missing in the PR or it just can be re-based and merged? |
Considering the age and the fact that it requires quite a bit of rebasing: I am going to close the PR. I will add a note to gh-8581 that the PR is stale but could be a basis for bringing this up again. Thanks for opening the initial PR! |
Support for frequency weights and aweights in np.var. I've kept it coherent with
np.cov
and used the same consistency when ddof is not equal to zero or one.Fixes #5164