rvs — SciPy v1.15.3 Manual (original) (raw)
scipy.stats.sampling.FastGeneratorInversion.
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 by NumericalInversePolynomial when the class is instantiated. Note that the default rvs
method of the rv_continuous class is overwritten. Hence, a different stream of random numbers is generated even if the same seed is used.