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_permutations

function

scipy.stats._qmc:_van_der_corput_permutations

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

Signature

def _van_der_corput_permutations(base: IntNumber, *, rng: SeedType = None) → np.ndarray

Summary

Permutations for scrambling a Van der Corput sequence.

Parameters

base : int

Base of the sequence.

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.

Returns

permutations : array_like

Permutation indices.

Notes

In Algorithm 1 of Owen 2017, a permutation of np.arange(base) is created for each positive integer k such that 1 - base**-k < 1 using floating-point arithmetic. For double precision floats, the condition 1 - base**-k < 1 can also be written as base**-k > 2**-54, which makes it more apparent how many permutations we need to create.

Aliases

  • scipy.stats._qmc._van_der_corput_permutations