rGamma¶
- rGamma(*args)¶
Realization of a Gamma distribution on .
- Parameters:
- kfloat
Shape parameter with .
- sizeint
The number of realizations to generate.
- Returns:
- realizationsfloat or sequence of float
The realizations of the distribution.
Notes
The probability density function is defined as:
This method is based on the algorithm (1979) described in [marsaglia2000] with a small optimization on the parameter that appears in the squeezing function . We also add the special treatment of the case .
Examples
>>> import openturns as ot >>> ot.RandomGenerator.SetSeed(0) >>> r = ot.DistFunc.rGamma(2.5)