and filling some of its elements, but others will be left uninitialized.
I was wondering if there is some syntax available to default-initialize all the Array{Int64, 1} elements, so they do not show as #undef.
I could iterate over all elements, checking for those that were left uninitialized isdefined(hist, i*j) and then initializing them to empty arrays hist[i, j] = Array{Int64, 1}(), but I was wondering if there is a better way of doing this.
Basically, I’m trying to replicate C++ RAII idiom, so I don’t get UndefErrors
if you need distinct empty vectors. The difference mostly matters if you intend to push data into the elements rather than replace them with new vectors.