Rand and Sampler interface for multiple samples

This is not possible with the Random library. I’ve an unpublished little package which allows to do something like

julia> rand(Fill(1:9, 2)) # Fill is a sampler for an array
2-element Vector{Int64}:
 7
 8

julia> rand(Pack(Fill(1:9, 2), 3)) # Pack is a sampler which "packs" arrays together
2×3 Matrix{Int64}:
 5  2  4
 3  7  3

I can try to prioritize the work for registering it if you think it would be useful to you.

3 Likes