Skip to main content
`Ctrl`+`K`
scipy.stats.sampling.FastGeneratorInversion.

# rvs

FastGeneratorInversion.rvs(size=None)

  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.