Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@domfournier
Copy link
Contributor

@domfournier domfournier commented Dec 27, 2023

Change reference to random.rand to random.randn for a centred normal distribution.

Address issue #1298

@codecov
Copy link

codecov bot commented Dec 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (102f323) 82.35% compared to head (ba0c639) 82.35%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1312   +/-   ##
=======================================
  Coverage   82.35%   82.35%           
=======================================
  Files         165      165           
  Lines       25239    25239           
=======================================
  Hits        20785    20785           
  Misses       4454     4454           

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

@domfournier domfournier changed the title ISSUE-1298 ISSUE-1298: Use normal distributed noise in example. Dec 29, 2023
Copy link
Member

@jcapriot jcapriot left a comment

Choose a reason for hiding this comment

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

Looks fine to me

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! Feel free to merge 🚀

Just one comment for future PRs on Numpy's random number generation: I think we should move from using the np.random.... functions for the new random number generator class: https://numpy.org/doc/stable/reference/random/generator.html

This class introduces a more transparent way on handling random seeds and also a more verbose interface: numbers with normal distributions can be generated with rng.normal(), while using a uniform distribution can be done with rng.uniform().

I've started applying these changes in #1286

Again, we should merge this PR as it is!

@domfournier
Copy link
Contributor Author

domfournier commented Jan 2, 2024

Ok, great.
You will have to merge @santisoler, I don't have the rights.

@jcapriot jcapriot merged commit 0cdda50 into main Jan 2, 2024
@domfournier domfournier deleted the ISSUE-1298 branch January 13, 2024 16:09
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.

4 participants