{ } Raw JSON

bundles / scipy latest / scipy / stats / _qmc / van_der_corput

function

scipy.stats._qmc:van_der_corput

source: /scipy/stats/_qmc.py :733

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