Closed ablaom closed 4 years ago
Of course the other possibility is a bug in Random's implementation of rand
for the objects constructed with RangeGenerator
, which I have not investigated.
Thanks for the report. This is expected behavior, RangeGenerator
dates back from pre-Julia-1.0 era and was kept only for helping the transition, it's deprecated. The current API would be to write gen = Random.Sampler(rng, 1:n)
. Cf. e.g. https://github.com/JuliaStats/StatsBase.jl/pull/576 which fixed a similar use of RangeGenerator
in StatsBase.
Thanks for explaining!
set up
in julia 1.4.2
in julia 1.5.0
This affects
rand
forDistributions.Categorical
and, presumably, many other functions.version info