Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Closed
wants to merge 2 commits into from

Conversation

MechCoder
Copy link
Contributor

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

@MechCoder
Copy link
Contributor Author

cc: @charris @ndawe @tpoole
I finally got some time to work on this. This might not be that important especially with the GSoC going on, but it might be good to have.

@MechCoder
Copy link
Contributor Author

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo cobariance

@homu
Copy link
Contributor

homu commented Feb 8, 2016

☔ The latest upstream changes (presumably #4619) made this pull request unmergeable. Please resolve the merge conflicts.

@OmerJog
Copy link

OmerJog commented May 5, 2019

What is the status of this PR?

@rgommers
Copy link
Member

rgommers commented May 5, 2019

What is the status of this PR?

hmm, this never got followed up on.

The two types of weights are weird imho. Also in np.cov they're weird, explanation isn't clear and no example. It doesn't look too good. I'd be in favor of closing this, or otherwise just using normal weights.

@charris
Copy link
Member

charris commented May 5, 2019

@rgommers IIRC, there was quite a long discussion about the two weights.

@rgommers
Copy link
Member

rgommers commented May 5, 2019

maybe we can find it and document it properly then? it doesn't make too much sense right now imho .....

@charris
Copy link
Member

charris commented May 5, 2019

I can't find it with a quick search, but there was this, that tickles my memory.

@tpoole
Copy link
Contributor

tpoole commented May 5, 2019

The previous discussion can be found here: #4960

@OmerJog
Copy link

OmerJog commented May 15, 2019

So was this abandoned since there is something missing in the PR or it just can be re-based and merged?

Base automatically changed from master to main March 4, 2021 02:03
@seberg
Copy link
Member

seberg commented Sep 8, 2021

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!

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

Successfully merging this pull request may close these issues.

ENH: Weight support for np.var
8 participants