bundles / scipy latest / scipy / stats / _stats_py / _compute_d
function
scipy.stats._stats_py:_compute_d
source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_stats_py.py:7492
Signature
def _compute_d(cdfvals, x, sign, xp = None)Summary
Computes D+/D- as used in the Kolmogorov-Smirnov test.
Extended Summary
Vectorized along the last axis.
Parameters
cdfvals: array_likeSorted array of CDF values between 0 and 1
x: array_likeSorted array of the stochastic variable itself
sign: intIndicates whether to compute D+ (+1) or D- (-1).
Returns
D: float or arrayThe maximum distance of the CDF values below/above (D+/D-) Uniform(0, 1).
loc_max: float or arrayThe location at which the maximum is reached.
Aliases
scipy.stats._stats_py._compute_d