Skip to content

ENH Replaced RandomState.rand with equivalent uniform #22327

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

Merged
merged 7 commits into from
Feb 1, 2022

Conversation

Micky774
Copy link
Contributor

@Micky774 Micky774 commented Jan 28, 2022

Reference Issues/PRs

A follow-up to #22271
Addresses #16988

What does this implement/fix? Explain your changes.

Replaced RandomState.rand with equivalent Generator-compatible RandomState.uniform calls

Any other comments?

Note that this is a non-functional change -- all behaviour should be maintained. This is a syntax/structural change which prepares for any eventual shift from RandomState-->Generator objects. See here for further details.

@Micky774
Copy link
Contributor Author

@thomasjpfan Follow up to the prior PR

@Micky774
Copy link
Contributor Author

@jeremiedbb In case you'd be interested in taking a look at this one as well

@thomasjpfan
Copy link
Member

For future reference, the open message should say that changing from rand to uniform is non-functional change. You can reference my comment at #22271 (review) This would make it easier for reviewers to evaluate the PR.

Also it's good to link to the original issue. (I think it should be #16988)

Copy link
Member

@jeremiedbb jeremiedbb 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 @Micky774

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

LGTM

@thomasjpfan thomasjpfan changed the title ENH Replaced RandomState.rand with equivalent Generator-compatible RandomState.uniform calls ENH Replaced RandomState.rand with equivalent uniform Feb 1, 2022
@thomasjpfan thomasjpfan merged commit 9f96d42 into scikit-learn:main Feb 1, 2022
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Feb 9, 2022
@Micky774 Micky774 deleted the random_prep branch July 15, 2022 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants