numpy draw a few bernoulli distributions at once
<p>Say I want to draw from a list of bernoulli distributions at once, e.g. with probabilities <code>[0.1, 0.2, 0.3]</code>. I could do this with a for loop but is there a better numpy way (use of scipy is also fine)?</p>

<pre><code>ps = [0.1, 0.2, 0.3]
[np.random.choice(2, p=[1 - p, p]) for p in ps]
</code></pre>