qrvs — SciPy v1.15.3 Manual (original) (raw)

scipy.stats.sampling.NumericalInverseHermite.

NumericalInverseHermite.qrvs(size=None, d=None, qmc_engine=None)#

Quasi-random variates of the given RV.

The qmc_engine is used to draw uniform quasi-random variates, and these are converted to quasi-random variates of the given RV using inverse transform sampling.

Parameters:

sizeint, tuple of ints, or None; optional

Defines shape of random variates array. Default is None.

dint or None, optional

Defines dimension of uniform quasi-random variates to be transformed. Default is None.

qmc_enginescipy.stats.qmc.QMCEngine(d=1), optional

Defines the object to use for drawing quasi-random variates. Default is None, which uses_scipy.stats.qmc.Halton(1)_.

Returns:

rvsndarray or scalar

Quasi-random variates. See Notes for shape information.

Notes

The shape of the output array depends on size, d, and qmc_engine. The intent is for the interface to be natural, but the detailed rules to achieve this are complicated.

The elements of the returned array are part of a low-discrepancy sequence. If d is 1, this means that none of the samples are truly independent. If d > 1, each slice rvs[..., i] will be of a quasi-independent sequence; see scipy.stats.qmc.QMCEngine for details. Note that when d > 1, the samples returned are still those of the provided univariate distribution, not a multivariate generalization of that distribution.