Best practices for generating vectors with ones, zeros, rand, etc

I suggest you watch this excellent talk by Jiahao Chen on the subject from JuliaCon a couple of years ago:

1 Like