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

gh-208: remove legacy random number generation #241

Merged
merged 3 commits into from
Sep 23, 2024
Merged

Conversation

Saransh-cpp
Copy link
Member

Gets rid of legacy RandomState and replaced it with the new random number Generator for rng calls.

Fixes: #208

@Saransh-cpp Saransh-cpp added the maintenance Maintenance: refactoring, typos, etc. label Sep 18, 2024
Copy link
Member

@paddyroddy paddyroddy left a 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

@ntessore
Copy link
Collaborator

I think it would be good to have the random seed as a test constant or pytest.fixture

Agree, I usually make rng itself the fixture, which can be helpful for testing with a mock RNG.

tests/core/test_algorithm.py Outdated Show resolved Hide resolved
@Saransh-cpp Saransh-cpp merged commit 14ac7c4 into main Sep 23, 2024
10 checks passed
@Saransh-cpp Saransh-cpp deleted the saransh/np-rngs branch September 23, 2024 13:32
paddyroddy added a commit that referenced this pull request Sep 25, 2024
Follows up #241. See explanation of what the `scope` parameter does for `pytest.fixture`. Seems silly to not use it (although in this case the speed-up will be minimal).
paddyroddy added a commit that referenced this pull request Sep 25, 2024
Follows up #241. See explanation
of what the `scope` parameter does for `pytest.fixture`. Seems silly to
not use it (although in this case the speed-up will be minimal).
Saransh-cpp pushed a commit that referenced this pull request Sep 25, 2024
Follows up #241. See explanation
of what the `scope` parameter does for `pytest.fixture`. Seems silly to
not use it (although in this case the speed-up will be minimal).
@Saransh-cpp Saransh-cpp self-assigned this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance: refactoring, typos, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove legacy random number generation
3 participants