Julia has exited. Press Enter to start a new session.
Starting Julia...
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.7.0 (2018-08-08 06:46 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu
julia> using Random
julia> Base.GLOBAL_RNG
WARNING: Base.GLOBAL_RNG is deprecated: it has been moved to the standard library package `Random`.
Add `using Random` to your imports.
in module Base
MersenneTwister(UInt32[0x551939b5, 0x30ebf9db, 0x8a89bfdd, 0xc06f42ad], Random.DSFMT.DSFMT_state(Int32[-1514060527, 1072828935, 798964544, 1073106308, 686496912, 1072959525, -156353866, 1072961088, -832773014, 1072880393 … 1004327676, 1073297540, -184450213, 1073579314, -52650434, 806077006, -1662434516, -106677665, 382, 0]), [1.54046, 1.6451, 1.36202, 1.65311, 1.88796, 1.91708, 1.86955, 1.65988, 1.43586, 1.13753 … 1.59987, 1.76979, 1.65074, 1.65116, 1.60697, 1.81886, 1.14073, 1.41917, 1.5763, 1.84502], UInt128[0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000 … 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000], 309, 0)
What’s the issue?
@carstenbauer, I have already used “using Random”, do I need to use “import Random” in order to use the “Base.GLOBAL_RNG”?
Calling Base.GLOBAL_RNG
still tries to access GLOBAL_RNG
in the module Base
, from which it was deprecated.
What are you actually trying to do? It might be helpful to consult the Random docs
2 Likes
@nilshg, I was trying to figure it out what’s going on. Thank you.
I tested it again. This time,
using Random
Random.GLOBAL_RNG
works.