skypy.utils.special.gammaincc

skypy.utils.special.gammaincc(a, x)[source] [edit on github]

Regularized upper incomplete gamma function.

This implementation of gammaincc allows \(a\) real and \(x\) nonnegative.

Parameters
aarray_like

Real parameter.

xarray_like

Nonnegative argument.

Returns
scalar or ndarray

Values of the upper incomplete gamma function.

See also

scipy.special.gammaincc

Computes the start of the recurrence.

Notes

The function value is computed via a recurrence from the value of scipy.special.gammaincc for arguments \(a-n, x\) where \(n\) is the smallest integer such that \(a-n \ge 0\).

Examples

This implementation of gammaincc supports positive and negative values of a.

>>> from skypy.utils.special import gammaincc
>>> gammaincc([-1.5, -0.5, 0.5, 1.5], 1.2)
array([ 0.03084582, -0.03378949,  0.12133525,  0.49363462])