from numpy.random import choice samples = choice(['R','G','B'], size=100, p=[0.2,0.5,0.3]) print(samples)
供众号:微程序学堂