-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
MNT fix test following scipy.stats.mode change in scipy development version #25393
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
Conversation
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 given that the CI passes.
Note: this PR alone is not enough to make scipy-dev green. For example, #25212 needs to be merged as well. |
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 as well. This is a temporary fix anyway. We will see later how to cleanly adapt the code base once we drop support for scipy > 1.11.
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Partially address #25202.
One of the failure of scipy-dev see https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=50872&view=logs&j=dfe99b15-50db-5d7b-b1e9-4105c42527cf&t=ef785ae2-496b-5b02-9f0e-07a6c3ab3081
scipy.stats.mode
has changed its returned array shape whenaxis=None
andkeepdims=True
. See scipy/scipy#17561 for more details.prints 2 in scipy development version and 1 in scipy latest release.
To be honest I am not sure about our exit strategy with this
_mode
thing ... because there will be a point where we still have to deal with the fact thatsklearn.utils.extmath.weighted_mode
is inconsistent withscipy.stats.mode
for recent scipy versions.Related to #23633