Skip to content

jamilr/weighted-random

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

choices.py - a Numpy-compatible implementation of weighted random number generator.

Choices(population, weights)

Choice class takes the population and the weights array as input arguments. The weights argument is an array of weights assigned to each element in the population array If the weights is omitted, the uniform weights are used - each element has an equal likelihood of being generated.

Releases

No releases published

Packages

No packages published

Languages