scipy.special.ndtri_exp#
- scipy.special.ndtri_exp(y) = <ufunc 'ndtri_exp'>#
Inverse of
log_ndtr
vs x. Allows for greater precision thanndtri
composed withnumpy.exp
for very small values of y and for y close to 0.- Parameters
- yarray_like of float
- Returns
- scalar or ndarray
Inverse of the log CDF of the standard normal distribution, evaluated at y.
Examples
>>> import scipy.special as sc
ndtri_exp
agrees with the naive implementation when the latter does not suffer from underflow.>>> sc.ndtri_exp(-1) -0.33747496376420244 >>> sc.ndtri(np.exp(-1)) -0.33747496376420244
For extreme values of y, the naive approach fails
>>> sc.ndtri(np.exp(-800)) -inf >>> sc.ndtri(np.exp(-1e-20)) inf
whereas
ndtri_exp
is still able to compute the result to high precision.>>> sc.ndtri_exp(-800) -39.88469483825668 >>> sc.ndtri_exp(-1e-20) 9.262340089798409