Advertisement
somebodycool69

sim

Jun 9th, 2023
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. def sim(N, zero_prob, mu, sigma):
  2. things = 1.0 - np.random.binomial(1, zero_prob, size=N)
  3. return things * np.random.normal(mu, sigma, size=N)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement