Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sim(N, zero_prob, mu, sigma):
- things = 1.0 - np.random.binomial(1, zero_prob, size=N)
- return things * np.random.normal(mu, sigma, size=N)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement