-
Notifications
You must be signed in to change notification settings - Fork 21
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
Move to new numpy.random.Generator #396
Conversation
…mpy.random.Generator
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 don't think we need to set a seed here. As far as I can see, there is no random number generator used throughout the test. However, please review whether we can indeed delete this (so far, I've only commented it out).
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 don't see one being used in the implementation as well. I guess we can remove it. However, the test should also be a fixture, right? The "make_test_adatashould be a
adata` fixture. Can you please implement it?
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.
Exactly what we wanted. Thank you very much! See my minor comment. Please merge after you've addressed it.
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 don't see one being used in the implementation as well. I guess we can remove it. However, the test should also be a fixture, right? The "make_test_adatashould be a
adata` fixture. Can you please implement it?
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #396 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 40 40
Lines 4888 4885 -3
=====================================
+ Misses 4888 4885 -3
|
PR Checklist
Description of changes
All occurrences of numpy Legacy Generator (RandomState) were replaced with the new
numpy.random.Generator
. Whenever an instance of thenumpy.random.Generator
was created, the recommended constructordefault_rng
was used.Technical details
I tested that all legacy warnings have disappeared by including the numpy rules from ruff in the pre-commit checks.