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

Update perturbIC.py #5

Open
wants to merge 155 commits into
base: main
Choose a base branch
from

Conversation

leoberhelman
Copy link
Contributor

This is a draft of a pull request to keep track of comments and questions I will have during refactoring and testing. Nothing yet but I am creating my unit tests.

@leoberhelman leoberhelman self-assigned this Oct 16, 2024
@leoberhelman leoberhelman linked an issue Oct 16, 2024 that may be closed by this pull request
Can the random generator be simplified?
src/perturbIC.py Outdated Show resolved Hide resolved
…er functions. The descriptions are still in progress.
@MartinDix
Copy link
Contributor

I can't work out why I specified it this way. In any case RandomState is no longer the recommended generator and the more up to date way of doing it would be

from numpy.random import Generator, PCG64
rg = Generator(PCG64(seed))
.. .rg.random(...)

This will give different results to the current implementation but will be stable in the future. PCG64 is currently the default bit generator but that could change so it's used explicitly here.

leoberhelman and others added 30 commits November 20, 2024 14:22
Co-authored-by: Davide Marchegiani <[email protected]>
Minor comments

Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Random seed but need to discuss more about how to restrict parameters

Co-authored-by: Davide Marchegiani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Requirements for perturbIC.py
3 participants