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 use of numpy's random number generators. #360

Merged
merged 20 commits into from
Sep 8, 2024

Conversation

jcapriot
Copy link
Member

@jcapriot jcapriot commented May 9, 2024

Allow the use of numpy's default random number generator in discretize. Still a bit of work to do to make it complete though.

@jcapriot jcapriot marked this pull request as draft May 9, 2024 22:11
Copy link

codecov bot commented May 9, 2024

Codecov Report

Attention: Patch coverage is 97.27891% with 8 lines in your changes missing coverage. Please review.

Project coverage is 86.28%. Comparing base (98caca7) to head (186130e).
Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
discretize/utils/mesh_utils.py 0.00% 3 Missing ⚠️
examples/plot_dc_resistivity.py 0.00% 3 Missing ⚠️
examples/plot_cahn_hilliard.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #360      +/-   ##
==========================================
+ Coverage   86.25%   86.28%   +0.03%     
==========================================
  Files          89       89              
  Lines       18695    18717      +22     
  Branches     2959     2961       +2     
==========================================
+ Hits        16125    16150      +25     
+ Misses       1884     1881       -3     
  Partials      686      686              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jcapriot jcapriot changed the title First steps at using random generators. Update use of numpy\'s random number generators. Sep 1, 2024
@jcapriot jcapriot changed the title Update use of numpy\'s random number generators. Update use of numpy's random number generators. Sep 1, 2024
@jcapriot jcapriot marked this pull request as ready for review September 1, 2024 18:45
@jcapriot jcapriot requested a review from santisoler September 1, 2024 18:45
@jcapriot
Copy link
Member Author

jcapriot commented Sep 1, 2024

Believe this is ready to go now. Only thing to discuss is the name of the keyword. I put it as rng instead of seed to make it clearer that you can pass a random number generator and not just a seed.

The other thing is that I made it so you can't easily set the random number generator for the success/fail messages. I think it's more interesting to keep getting different random messages. :)

Copy link
Member

@santisoler santisoler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I noticed that this PR also replaces the pymatsolver solvers for the scipy ones. I think it's ok if you want to leave those changes in this PR as long as we add it to the list of changes in the description and in the commit message.

@jcapriot jcapriot merged commit b0285e4 into simpeg:main Sep 8, 2024
25 checks passed
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.

2 participants