Project-MONAI / Project-MONAI/MONAI
use numpy random generator instead of randomstate
@ericspod is already working on this.
Since Jan 4, 2024.
- Dominant language
- Python
- Stars
- 8.7k
- Forks
- 1.6k
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 20
Description
Is your feature request related to a problem? Please describe.
https://numpy.org/doc/stable/reference/random/legacy.html#numpy.random.RandomState
The RandomState provides access to legacy generators. This generator is considered frozen and will have no further improvements.
https://numpy.org/doc/stable/reference/random/generator.html
The Generator provides access to a wide range of distributions, and served as a replacement for RandomState. The main difference between the two is that Generator relies on an additional BitGenerator to manage state and generate the random bits, which are then transformed into random values from useful distributions. The default BitGenerator used by Generator is PCG64. The BitGenerator can be changed by passing an instantized BitGenerator to Generator.
API differences
https://numpy.org/doc/stable/reference/random/new-or-different.html#new-or-different
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.