Closed 3f6a closed 8 months ago
The arguments have to be provided in different order:
julia> using Distributions, Random
julia> X = zeros(2, 10)
2×10 Matrix{Float64}:
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
julia> rand!(MultivariateNormal([1.0, 2.0], [1.0 0.0; 0.0 1.0]), X)
2×10 Matrix{Float64}:
0.337452 0.144253 2.32285 -1.27711 … -0.530822 0.0721648 -0.624228
1.39392 2.19907 3.2094 3.96336 -1.20843 1.82541 0.828073
julia> X
2×10 Matrix{Float64}:
0.337452 0.144253 2.32285 -1.27711 … -0.530822 0.0721648 -0.624228
1.39392 2.19907 3.2094 3.96336 -1.20843 1.82541 0.828073
Thanks for the response.
I think it's a bit confusing, but please feel free to close this.