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

possible test failure in upcoming Julia version 1.5 #31

Closed
rfourquet opened this issue Apr 24, 2020 · 2 comments
Closed

possible test failure in upcoming Julia version 1.5 #31

rfourquet opened this issue Apr 24, 2020 · 2 comments

Comments

@rfourquet
Copy link

A PkgEval run for a PR which changes the generated numbers for randn! indicates that the tests of this package might fail in Julia 1.5 (and on Julia current master). Apologies if this is a false positive.
cf. https://github.com/JuliaCI/NanosoldierReports/blob/7de24e455342298cbef56826b5827f0d7640d2c1/pkgeval/by_hash/b89e35c_vs_098ef24/logs/CausalInference/1.5.0-DEV-71a4a114c2.log

@mschauer
Copy link
Owner

Do we have an easy way to access the old random number generator?

@rfourquet
Copy link
Author

I'm afraid not. One (temporary) solution for tests might be to redefine the old randn!, e.g.

function Base.randn!(rng::MersenneTwister, A::Array{Float64}) 
    for i in eachindex(A)
        @inbounds A[i] = randn(rng, Float64)
    end
    A
end

Also, for future immunity you might like to try https://github.com/rfourquet/StableRNGs.jl :)

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

No branches or pull requests

2 participants