I have tried the following code:
import numpy as np
let = ['A', 'B', 'C', 'D']
print(np.random.choice(let, 8, p=[0.25, 0.25, 0.25, 0.25]))
output:
['A' 'B' 'C' 'A' 'A' 'C' 'A' 'A']
It should be random but I want the following output: 25% A, 25%, B, 25% C, 25% D. Something like the following:
['A' 'B' 'C' 'A' 'C' 'D' 'D' 'B']
What am I missing?
np.random.permutation(let*4)