How to randomly assign values row-wise in a numpy array
stackoverflow.com