scipy.special.kolmogi#

scipy.special.kolmogi(p, out=None) = <wrapped_ufunc 'kolmogi'>#

Inverse Survival Function of Kolmogorov distribution.

It is the inverse function to kolmogorov. Returns y such that kolmogorov(y) == p.

Parameters:
pfloat array_like

Probability

outndarray, optional

Optional output array for the function results

Returns:
scalar or ndarray

The value(s) of kolmogi(p)

See also

kolmogorov

The Survival Function for the distribution

scipy.stats.kstwobign

Provides the functionality as a continuous distribution

smirnov, smirnovi

Functions for the one-sided distribution

Notes

For historical reasons this function is exposed in scipy.special, but the recommended way to achieve the most accurate CDF/SF/PDF/PPF/ISF computations is to use the scipy.stats.kstwobign distribution.

Array API Standard Support

kolmogi has support for Python Array API Standard compatible backends in addition to NumPy. The following combinations of backend and device (or other capability) are supported.

Library

CPU

GPU

NumPy

✅

n/a

CuPy

n/a

⛔

PyTorch

✅

⛔

JAX

✅

⛔

Dask

✅

n/a

For the NumPy backend, this function supports all NumPy ufunc keyword arguments. Other backends may support out, but typically none of the other ufunc kwargs. out is typically supported for CuPy and PyTorch, but not currently in cases where SciPy relies on a generic Array API implementation or, for PyTorch on CPU, falls back to the NumPy backend. out is never supported for JAX because JAX arrays are immutable. kolmogi does not currently support out for the PyTorch backend.

See Array API coverage for more information.

Examples

>>> from scipy.special import kolmogi
>>> kolmogi([0, 0.1, 0.25, 0.5, 0.75, 0.9, 1.0])
array([        inf,  1.22384787,  1.01918472,  0.82757356,  0.67644769,
        0.57117327,  0.        ])