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
BUG Add tol to _make_unique to avoid inf values in IsotonicRegression #18639
Conversation
Could you please add a new non-regression test for |
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.
Thanks for fixing this nasty bug @lucyleeow! Here are a few more suggestions for improvements. But otherwise LGTM.
FYI, I merged the master branch that has a fix for the unrelated failing macOS CI. |
Thanks for the suggestions @ogrisel, added! |
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.
This looks good to me! Can you please add a new entry for doc/whats_new/0.24.rst
?
Maybe 2nd review @glemaitre |
thanks @lucyleeow ! |
Reference Issues/PRs
Fixes #10903
Closes #10981 and #17758
What does this implement/fix? Explain your changes.
Add a tol when checking equality in
_make_unique
, such that values are deemed unique only if their difference is greater or equal than 1e-15 i.e.:this agrees with Python:
Note that this is not the case for 0:
see more here: #17758 (comment)
Any other comments?
Also removed
current_count
as it does not seem to be used anymore (as discussed with @ogrisel)cc @ogrisel