-
Notifications
You must be signed in to change notification settings - Fork 194
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
functions that only support finite weights now throw errors for non-finites #914
Conversation
Nightly test failures unrelated |
bump... |
another bump... |
and another bump... |
yet another bump... |
yet yet another bump... |
yet yet yet another bump... |
The PR can't be merged? "This branch has conflicts that must be resolved" and tests are failing. |
Idk the policy here, but saw that you approved these changes 1.5 months ago.
I think these conflicts are due to code changes after this PR was created/approved. This is impossible to avoid in advance, of course the longer the PR stays unmerged the more conflicts will appear.
Failures unrelated to changes in this PR:
|
yet yet yet yet another bump... |
yet yet yet yet yet another bump... |
yet yet yet yet yet yet another bump... |
AbstractWeights can contain any values, including NaNs – and many StatsBase functions work with them just fine. But not all, for some like
sample
it doesn't make sense. So, here I make these functions throw an exception instead of returning a potentially incorrect result.Some docstrings, like the one for
quantile
, even explicitly say thatbut this wasn't the case without this PR.
Ideally, NaNs should also be supported by concrete weights types included into StatsBase (#904), but this PR is independent of that.