Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

np random choice given distribution

np.random.choice(5, 3, p=[0.1, 0, 0.3, 0.6, 0])
array([3, 3, 0]) # random
Source by numpy.org #
 
PREVIOUS NEXT
Tagged: #np #random #choice #distribution
ADD COMMENT
Topic
Name
8+8 =