This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / stats / _qmc / van_der_corput

function

scipy.stats._qmc:van_der_corput

source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_qmc.py:730

Signature

def van_der_corput(n: IntNumber, base: IntNumber = 2, *, start_index: IntNumber = 0, scramble: bool = False, permutations: npt.ArrayLike | None = None, rng: SeedType = None, workers: IntNumber = 1) → np.ndarray

Summary

Van der Corput sequence.

Extended Summary

Pseudo-random number generator based on a b-adic expansion.

Scrambling uses permutations of the remainders (see [1]). Multiple permutations are applied to construct a point. The sequence of permutations has to be the same for all points of the sequence.

Parameters

n : int

Number of element of the sequence.

base : int, optional

Base of the sequence. Default is 2.

start_index : int, optional

Index to start the sequence from. Default is 0.

scramble : bool, optional

If True, use Owen scrambling. Otherwise no scrambling is done. Default is True.

permutations : array_like, optional

Permutations used for scrambling.

rng : `numpy.random.Generator`, optional

Pseudorandom number generator state. When rng is None, a new numpy.random.Generator is created using entropy from the operating system. Types other than numpy.random.Generator are passed to numpy.random.default_rng to instantiate a Generator.

workers : int, optional

Number of workers to use for parallel processing. If -1 is given all CPU threads are used. Default is 1.

Returns

sequence : list (n,)

Sequence of Van der Corput.

Aliases

  • scipy.stats._qmc.van_der_corput