Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BUG: weighted quantile for some zero weights (#27549)#27563

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
charris merged 1 commit intonumpy:maintenance/2.1.xfromcharris:backport-27549
Oct 15, 2024

Conversation

charris
Copy link
Member

Backport of#27549.

This PR fixed weighted quantiles (and percentiles) for a corner case:

  • at least one weight is zero
  • q=0 (0-quantile equals minimum) Then:
np.quantile(np.arange(3), 0, weights=[0, 0, 1], method="inverted_cdf")

should return 2, the minimum when neglecting zero weight values. Current main returns 0.

This PR fixed weighted quantiles (and percentiles) for a corner case:* at least one weight is zero* q=0 (0-quantile equals minimum)Then:```np.quantile(np.arange(3), 0, weights=[0, 0, 1], method="inverted_cdf")```should return 2, the minimum when neglecting zero weight values. Current main returns 0.
@charrischarris added 00 - Bug 08 - BackportUsed to tag backport PRs labelsOct 15, 2024
@charrischarris added this to the2.1.3 release milestoneOct 15, 2024
@charrischarris merged commit25d3339 intonumpy:maintenance/2.1.xOct 15, 2024
62 of 65 checks passed
@charrischarris deleted the backport-27549 branchOctober 15, 2024 17:43
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
00 - Bug08 - BackportUsed to tag backport PRs
Projects
None yet
Milestone
2.1.3 release
Development

Successfully merging this pull request may close these issues.

2 participants
@charris@lorentzenchr

[8]ページ先頭

©2009-2025 Movatter.jp