Skip to content
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

Fixing integer overflow on 32-bit architectures. #20904

Merged
merged 7 commits into from
Sep 3, 2021

Conversation

t-jakubek
Copy link
Contributor

Reference Issues/PRs

Fixes #20774

What does this implement/fix? Explain your changes.

Changing order of operations, so there is no integer overflow and train_test_split() returns valid data.

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, aside for the below comment. Thanks!

Please add an entry to the change log at doc/whats_new/v1.0.rst. Like the other entries there, please reference this pull request with :pr: and credit yourself with :user:.

sklearn/utils/__init__.py Show resolved Hide resolved
Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you @t-jakubek, here are minor suggestions for style.

doc/whats_new/v1.0.rst Outdated Show resolved Hide resolved
sklearn/model_selection/tests/test_split.py Outdated Show resolved Hide resolved
sklearn/utils/tests/test_utils.py Outdated Show resolved Hide resolved
t-jakubek and others added 3 commits September 2, 2021 20:05
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix!

@ogrisel ogrisel merged commit d5215a1 into scikit-learn:main Sep 3, 2021
adrinjalali pushed a commit to adrinjalali/scikit-learn that referenced this pull request Sep 3, 2021
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
adrinjalali pushed a commit that referenced this pull request Sep 6, 2021
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integer overflow in _approximate_mode()
5 participants