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”.

Generators Wrapped#

For continuous distributions#

NumericalInverseHermite(dist, *[, domain, ...])

Hermite interpolation based INVersion of CDF (HINV).

NumericalInversePolynomial(dist, *[, mode, ...])

Polynomial interpolation based INVersion of CDF (PINV).

TransformedDensityRejection(dist, *[, mode, ...])

Transformed Density Rejection (TDR) Method.

SimpleRatioUniforms(dist, *[, mode, ...])

Simple Ratio-of-Uniforms (SROU) Method.

For discrete distributions#

DiscreteAliasUrn(dist, *[, domain, ...])

Discrete Alias-Urn Method.

DiscreteGuideTable(dist, *[, domain, ...])

Discrete Guide Table method.

Warnings / Errors used in scipy.stats.sampling#

UNURANError

Raised when an error occurs in the UNU.RAN library.