<p dir="ltr">On 22 Sep 2013 23:04, "David Goldsmith" <<a href="mailto:d.l.goldsmith@gmail.com">d.l.goldsmith@gmail.com</a>> wrote:<br>
><br>
> Is np.random.randint(2, size=N) the fastest way to do this?  Thanks!</p>
<p dir="ltr">Are you concerned about speed or memory use? The operation you show should already be quite fast. A more memory efficient approach would be to generate integers and use their binary representation.</p>
<p dir="ltr">Stéfan<br>
</p>