You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just noticed that calling parse_args() changes the state of the GLOBAL_RNG:
julia>using ArgParse, Random
julia> Random.seed!(1)
TaskLocalRNG()
julia>rand()
0.07336635446929285# <- expected value when seeding the GLOBAL_RNG with 1
julia> Random.seed!(1)
TaskLocalRNG()
julia> s =ArgParseSettings()
ArgParseSettings(
...
)
julia>rand()
0.07336635446929285# <- this is still correct
julia> Random.seed!(1)
TaskLocalRNG()
julia>parse_args(s)
Dict{String, Any}()
julia>rand()
0.6702639583444937# <- not the expected value
Is there a reason for this? Since ArgParse doesn't even import Random, I don't understand why this happens, but it's giving me some problems with my own code.
The text was updated successfully, but these errors were encountered:
I've just noticed that calling
parse_args()
changes the state of theGLOBAL_RNG
:Is there a reason for this? Since ArgParse doesn't even import Random, I don't understand why this happens, but it's giving me some problems with my own code.
The text was updated successfully, but these errors were encountered: