python - Random choice with negative weights -
and
c . They are all floats, and can be positive or negative with the upper and lower boundaries. How do I go about preparing a function that takes these variables as loads and randomly related verb ( A , b < / Code> and C ) Example : A = 10b = -2c = 7 < / Code> The function should take most of the time to A , C , and b at least often . I do not have to deal with the weighted 'Random Functions' negative weight found on this site.
weight = [10, -2, 7] offset = minutes (weight) = pivetates = [Z - offset + z for zip] You can now use a weighted random function which requires positive weight.
Comments
Post a Comment