Initiate multiple arrays from a set of names with comprehension

If you know the names of the variables a priori, you can do

(a, b, c) = [Vector{Float64}(undef, 10) for _ in 1:3]

But if you just have entries (and if the elements of entries can be arbitrary), then creating a dictionary is probably the way to go.

1 Like