I am trying to generate a 2D list with NumPy that has 10 of one value, 5 of the other, and then leave all the rest blank.
This is my code:
arrOps = ["B", "T", " "]
board = np.random.choice(arrOps, size=(8,8), p=[0.078125,0.15625,0.765625])
print(board)
The probabilities should theoretically work, however they consistantly generate 11 or 12 of T, and only 3 or 4 of B. Is there anyway to make it so that the probabilities are set amounts?