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

TST: Use numpy random generator for testing data #54209

Merged
merged 43 commits into from
Aug 1, 2023

Conversation

mroeschke
Copy link
Member

This PR diff is large, but essentially it enables a ruff rule NPY002 to use the numpy random Generator instead of the legacy random methods.

The change is replacing np.random with np.random.default_rng(2) before calling the data generation method. I think starting to use a fixed seed is good to make failures more reproducible.

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Jul 20, 2023
@mroeschke mroeschke added this to the 2.1 milestone Jul 20, 2023
@mroeschke
Copy link
Member Author

Looks like tests are passing here so going to merge. Happy to follow up if needed

@mroeschke mroeschke merged commit 11cdde6 into pandas-dev:main Aug 1, 2023
32 checks passed
@mroeschke mroeschke deleted the tst/random branch August 1, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant