bundles / scipy 1.17.1 / scipy / stats / _qmc / QMCEngine / integers
function
scipy.stats._qmc:QMCEngine.integers
source: /scipy/stats/_qmc.py :1003
Signature
def integers ( self , l_bounds : npt.ArrayLike , * , u_bounds : npt.ArrayLike | None = None , n : IntNumber = 1 , endpoint : bool = False , workers : IntNumber = 1 ) → np.ndarray Summary
Draw n integers from l_bounds (inclusive) to u_bounds (exclusive), or if endpoint=True, l_bounds (inclusive) to u_bounds (inclusive).
Parameters
l_bounds: int or array-like of intsLowest (signed) integers to be drawn (unless
u_bounds=None, in which case this parameter is 0 and this value is used foru_bounds).u_bounds: int or array-like of ints, optionalIf provided, one above the largest (signed) integer to be drawn (see above for behavior if
u_bounds=None). If array-like, must contain integer values.n: int, optionalNumber of samples to generate in the parameter space. Default is 1.
endpoint: bool, optionalIf true, sample from the interval
[l_bounds, u_bounds]instead of the default[l_bounds, u_bounds). Defaults is False.workers: int, optionalNumber of workers to use for parallel processing. If -1 is given all CPU threads are used. Only supported when using Halton Default is 1.
Returns
sample: array_like (n, d)QMC sample.
Notes
It is safe to just use the same [0, 1) to integer mapping with QMC that you would use with MC. You still get unbiasedness, a strong law of large numbers, an asymptotically infinite variance reduction and a finite sample variance bound.
To convert a sample from to , with the lower bounds and the upper bounds, the following transformation is used:
Aliases
-
scipy.stats._qmc.QMCEngine.integers