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 / _perturb_discrepancy

function

scipy.stats._qmc:_perturb_discrepancy

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

Signature

def _perturb_discrepancy(sample: np.ndarray, i1: int, i2: int, k: int, disc: float)

Summary

Centered discrepancy after an elementary perturbation of a LHS.

Extended Summary

An elementary perturbation consists of an exchange of coordinates between two points: sample[i1, k] <-> sample[i2, k]. By construction, this operation conserves the LHS properties.

Parameters

sample : array_like (n, d)

The sample (before permutation) to compute the discrepancy from.

i1 : int

The first line of the elementary permutation.

i2 : int

The second line of the elementary permutation.

k : int

The column of the elementary permutation.

disc : float

Centered discrepancy of the design before permutation.

Returns

discrepancy : float

Centered discrepancy of the design after permutation.

Aliases

  • scipy.stats._qmc._perturb_discrepancy