Hi all,

I’m trying to generate m binary traits in n individuals. I want to use a Bernoulli model in the last step to map the n x m probabilities to binary outcomes of the same dimension, however the Bernoulli function only accepts a float as the parameter p. The only way I can think of now is to write a custom function with for loops… Are there better ways to vectorize it?

Thanks.