-
Notifications
You must be signed in to change notification settings - Fork 8
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
gh-208: remove legacy random number generation #241
base: main
Are you sure you want to change the base?
Conversation
40f13c5
to
96fa487
Compare
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 think it would be good to have the random seed as a test constant or pytest.fixture
Agree, I usually make |
96fa487
to
a2771ce
Compare
@pytest.fixture | ||
def rng(): | ||
import numpy as np | ||
|
||
return np.random.default_rng(seed=42) | ||
|
||
|
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.
Move this to conftest.py so it only needs to be defined once?
Gets rid of legacy
RandomState
and replaced it with the new random numberGenerator
for rng calls.Fixes: #208