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
None
in 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.,
ppf
computed byNumericalInversePolynomial
when the class is instantiated. Note that the defaultrvs
method of the rv_continuous class is overwritten. Hence, a different stream of random numbers is generated even if the same seed is used.