I need to use arrays in which each element is a vector of arbitrary length. In itself, it works fine but when I try to append! an element to another array of vectors, it appends the vector to every elements of the target array. Obviously this is not what I want. Any ideas?
Creating a deepcopy of the element, appending to it and putting the deepycopy as the element works, but it is way too slow for what I am doing.
The fill! fills merged_stack with the same object. Alle the empty arrays Float64[] are a single object.
There are several ways to achieve what you need, typically, I don’t have the most efficient way, but others will provide them.
You can do with a loop for example: