Random Number Generators (scipy.stats.sampling)#
This module contains a collection of random number generators to sample from univariate continuous and discrete distributions. It uses the implementation of a C library called “UNU.RAN”. The only exception is RatioUniforms, which is a pure Python implementation of the Ratio-of-Uniforms method.
Generators Wrapped#
For continuous distributions#
  | 
Hermite interpolation based INVersion of CDF (HINV).  | 
  | 
Polynomial interpolation based INVersion of CDF (PINV).  | 
  | 
Transformed Density Rejection (TDR) Method.  | 
  | 
Simple Ratio-of-Uniforms (SROU) Method.  | 
  | 
Generate random samples from a probability density function using the ratio-of-uniforms method.  | 
For discrete distributions#
  | 
Discrete Alias-Urn Method.  | 
  | 
Discrete Guide Table method.  | 
Warnings / Errors used in scipy.stats.sampling#
Raised when an error occurs in the UNU.RAN library.  | 
Generators for pre-defined distributions#
To easily apply the above methods for some of the continuous distributions
in scipy.stats, the following functionality can be used:
  | 
Fast sampling by numerical inversion of the CDF for a large class of continuous distributions in   |