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 thatkolmogorov(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
kolmogorovThe Survival Function for the distribution
scipy.stats.kstwobignProvides the functionality as a continuous distribution
smirnov,smirnoviFunctions 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 thescipy.stats.kstwobigndistribution.Array API Standard Support
kolmogihas 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.outis 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.outis never supported for JAX because JAX arrays are immutable.kolmogidoes not currently supportoutfor 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. ])