Bernouilli
random.Bernouilli(self, values, p=0.5)Bernouilli (binomial) distribution, returning the first of the two values with probability p.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| values | list | list of values. | required |
| p | float | probability of returning the first value. | 0.5 |
Methods
| Name | Description |
|---|---|
| sample | Samples from the distribution and returns an array of the desired shape. |
sample
random.Bernouilli.sample(shape)Samples from the distribution and returns an array of the desired shape.