-
-
Notifications
You must be signed in to change notification settings - Fork 26k
FIX Remove spurious UserWarning
#25129
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
FIX Remove spurious UserWarning
#25129
Conversation
The condition was not the proper one: it must be a conjuction and not a disjonction. This is rewritten more naturally using a negation.
A small regression test could be nice here. |
sklearn/metrics/_pairwise_distances_reduction/_radius_neighbors.pyx.tp
Outdated
Show resolved
Hide resolved
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.
Otherwise LGTM
sklearn/metrics/_pairwise_distances_reduction/_radius_neighbors.pyx.tp
Outdated
Show resolved
Hide resolved
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.
LGTM
Co-authored-by: Thomas J. Fan <[email protected]>
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.
I confirm that the rendering of the doc no longer raises such spurious warnings. Thanks @jjerphan!
Let's see if the auto-merge is going to work ;) |
Reference Issues/PRs
None, reported IRL by @ArturoAmorQ
What does this implement/fix? Explain your changes.
Currently spurious
UserWarning
e.g.:are reported to users.
This is notably the case in example such as this one.
The problem is due to an improper condition.
The condition was not the proper one: it must be a conjuction and not a disjonction.
This is rewritten more naturally using a negation.