bundles / scipy 1.17.1 / scipy / stats / _qmc / _van_der_corput_permutations
function
scipy.stats._qmc:_van_der_corput_permutations
source: /scipy/stats/_qmc.py :686
Signature
def _van_der_corput_permutations ( base : IntNumber , * , rng : SeedType = None ) → np.ndarray Summary
Permutations for scrambling a Van der Corput sequence.
Parameters
base: intBase of the sequence.
rng: `numpy.random.Generator`, optionalPseudorandom number generator state. When
rngis 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 aGenerator.
Returns
permutations: array_likePermutation 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