univariate
poisson
Generator for a Poisson random variable
The numpy generator is used as default
- class Poisson(lam: Union[int, float], algorithm: ALGORITHM = ALGORITHM.NUMPY)[source]
Bases:
SamplingPoisson random variate
- __init__(lam: Union[int, float], algorithm: ALGORITHM = ALGORITHM.NUMPY)[source]
- Parameters
lam – rate/intensity parameter
algorithm –
chosen algorithm (numpy by default)
- sample(size: int = 1) ndarray[Any, dtype[float]][source]
sample a random variable corresponding the distribution in scope
- Parameters
size – size of the sampling vector
- Returns
the array of simulated variables
uniform
Generator for standard uniform random variables
Numpy is used here, the generator returns random floats in the half-open interval [0.0, 1.0) see https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.random_sample.html#numpy.random.random_sample