Dear Robert,

I agree this is definitely not worth changing anything major. I was mostly 
suggesting this for convenience and was envisioning simply taking p = weights / 
sum(weights) internally if weights is supplied. I will note that if you are 
working with weights that happen to all be integers, which they often are, you 
have to take some care when converting them to probabilities to use in the 
random.choice() function (i.e., you cannot use "/="). However, you are right in 
that this is a pretty minor thing that can be written in-line.

Thank you for your time.
_______________________________________________
NumPy-Discussion mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/numpy-discussion.python.org
Member address: [email protected]

Reply via email to