[Numpy-discussion] random number genration

Alex Ter-Sarkissov ater1980 at gmail.com
Tue Mar 29 05:00:35 EDT 2011

If I want to generate a string of random bits with equal probability I run


What if I want a specific proportion of bits? In other words, each bit is 1
with probability p<1/2 and 0 with probability q=1-p?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110329/beb49b5b/attachment.html>

More information about the NumPy-Discussion mailing list