I am looking for a high-performance Python solution to the following problem:
Flip a biased coin n times so that the probability of heads (=1) is equal to a given probability p. n is in the millions.
I suspect there can be a very efficient numpy
-based solution.
Aucun commentaire:
Enregistrer un commentaire