I get 16 allocations when I want to generate random samples from a MvNormal with full covariance matrix. Apparently, there is also type instability problem. Is there a way to generate random samples with full covariance matrix without allocations?
Best,
Felix
using Distributions
using Random
d = MvNormal([1.0, 1.0], [1.0 0.5; 0.5 1.0])
u = Array{Float64}(undef, 2)
@allocated rand!(d, u)
@profview_allocs rand!(d, u) sample_rate = 1
Hello,
thanks for creating the Distributions package!
I get 16 allocations when I want to generate random samples from a
MvNormal
with full covariance matrix. Apparently, there is also type instability problem. Is there a way to generate random samples with full covariance matrix without allocations?Best, Felix