Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork10.9k
BUG: quantile should error when weights are all zeros#28595
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
base:main
Are you sure you want to change the base?
Changes from1 commit
293ea24
ae8cd54
565fc75
8309d16
04d05f6
c76b5ad
bfcec09
f06a1f8
1303b3c
ad95df2
dc14e6b
8eeed6a
4fe3444
ba2c398
2e8e2ea
3a20796
40075b3
a83887b
3d1c7b0
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -4544,7 +4544,7 @@ def quantile(a, | ||
raise ValueError("Weights must be non-infinite") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. nit: non-infinite-> finite probably | ||
elif np.any(np.isnan(weights)): | ||
raise ValueError("At least one weight is nan") | ||
elif weights.dtype== object: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Note that this loop can still give unexpected errors, because you are here counting on object arrays to be turned into their values as scalars. E.g.,
This will be an uninformative error! I think we have two choices: just not check for | ||
for w in weights: | ||
if np.isnan(w): | ||
raise ValueError("At least one weight is nan") | ||
Uh oh!
There was an error while loading.Please reload this page.