Skip to main content
`Ctrl`+`K`

# scipy.stats.sampling.FastGeneratorInversion.rvs

FastGeneratorInversion.rvs(size=None)

  Sample from the distribution by inversion.

  Parameters:
    size int or tuple, optional

      The shape of samples. Default is `None` in which case a scalar sample is returned.

  Returns:
    rvs array_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.