I have some code that needs to shuffle up the elements of a vector of vectors the way I have this coded feels terrible and I was hoping some advice could come on how to make this better. The key is that the data is stored as a vector of “rows” all of equal size, but I want to shuffle the “columns” of this but return back the original structure of vector of vectors.
data = [1:5 for i in 1:20]
stacked = hcat(data...)
hcat([shuffle(stacked[:, i]) for i in 1:size(stacked, 2)]...)
Thanks so much for any tips!