scipy.stats.sampling.FastGeneratorInversion.
rvs#
- FastGeneratorInversion.rvs(size=None)[source]#
Sample from the distribution by inversion.
- Parameters:
- sizeint or tuple, optional
The shape of samples. Default is
Nonein which case a scalar sample is returned.
- Returns:
- rvsarray_like
A NumPy array of random variates.
Notes
Random variates are generated by numerical inversion of the CDF, i.e.,
ppfcomputed byNumericalInversePolynomialwhen the class is instantiated. Note that the defaultrvsmethod of the rv_continuous class is overwritten. Hence, a different stream of random numbers is generated even if the same seed is used.