Featured

SciPy incomplete gamma function

I got tripped up by this recently when doing eigenvalue calculations in python. I wanted to evaluate the incomplete gamma function \gamma (a, x)\;=\;\int_{0}^{x}t^{a-1}e^{-t}dt. After using the SciPy {\tt gammainc} function I was scratching my head as to why I was seeing a discrepancy between my numerical calculations for the eigenvalues and my theoretical calculation. Then I came across this post by John D Cook that helped clarify things. The SciPy function {\tt gammainc} actually calculates \gamma(a,x)/\Gamma(a).