bernoulli_rng - add signature ints bernoulli_rng(real theta)
#3044
Labels
distributions
Issues that deal with distribution functions: pdf, pmf, cdf
Description
Add implementation of
bernoulli_rng
which generates an array of bernoulli outcomes for a single value oftheta
.Example
Currently, it is necessary to use a loop, e.g.
The vectorized alternative is:
This is problematic for 2 reasons:
thetas
Expected Output
It would be nice to be able to do the following:
Current Version:
v4.8.1
The text was updated successfully, but these errors were encountered: