Best way to shuffle elements in a vector of vectors

To make it for columns instead of rows in Stefan’s second example, just use [:,i]. Also, use $ before variables with @btime to get proper timings.

2 Likes