Skip to content

fix: random number generation#159

Merged
ChrisRackauckas merged 2 commits intoFluxML:masterfrom
markus7800:master
Nov 21, 2023
Merged

fix: random number generation#159
ChrisRackauckas merged 2 commits intoFluxML:masterfrom
markus7800:master

Conversation

@markus7800
Copy link
Copy Markdown
Contributor

Fixes #158.

x = [Random.randn(Random.default_rng(), Tracker.TrackedReal{Float64}) for i in 1:10^6]
Distributions.mean(x) 
Distributions.std(x)

now produces a normal sample, and not a uniform sample as before.

@ChrisRackauckas
Copy link
Copy Markdown
Member

Can you add a test for this as well?

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 6943072974

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 72.74%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib/real.jl 0 1 0.0%
Totals Coverage Status
Change from base Build 6905129204: 0.0%
Covered Lines: 515
Relevant Lines: 708

💛 - Coveralls

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (59b1e5e) 72.74% compared to head (4141bb5) 72.74%.

Files Patch % Lines
src/lib/real.jl 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #159   +/-   ##
=======================================
  Coverage   72.74%   72.74%           
=======================================
  Files           9        9           
  Lines         708      708           
=======================================
  Hits          515      515           
  Misses        193      193           

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

@ChrisRackauckas ChrisRackauckas merged commit f0df0ef into FluxML:master Nov 21, 2023
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.

Random number generation uses wrong rand

4 participants