I have this array:
arr=[[1,1,1],[0,0,0],[0,0,0]
I would like the 1's to be distributed in randomly in second, third and first row.
For example, a wanted result would be:
arr=[[1,1,0],[0,0,0],[0,1,0] or arr=[[1,0,0],[0,0,1],[0,1,0]
However, using
np.random.shuffle(arr)
results in shuffling the rows and not the elements.