Create random numbers into a same array

Is there any way to create random numbers into a same array? I am simulating using rand(n) ~1M times, i.e. to determine snp allele to drop into the next generation. This causes a lot of allocations.

Or is there some better way to simulate.

Maybe rand! is what you need?

2 Likes

Many thanks. I didn’t read the docs enough.

1 Like