What is the equivalent of numpy.random.choice for generating a non-uniform random sample based on a user supplied probability?

You might be looking for StatsBase.sample

4 Likes