I'm creating a numpy zero array of 10x5 and i wish to fill in each column with a shuffled list of numbers from 1-10. However I have a problem because it only fills in the first column and the list.pop() doesn't work plus i think my nested for loops even though i tried using the row and preferences in different order. Any help would be greatly appreciated.
i = 0
j = 0
for column in matrix:
preferences = [1,2,3,4,5,6,7,8,9,10]
random.shuffle(preferences)
for number in preferences:
for row in matrix:
chosen = preferences.pop(0)
matrix[j,i] = chosen
j+= 1
i+= 1