SciPy

scipy.special.gamma

scipy.special.gamma(z) = <ufunc 'gamma'>

Gamma function

The gamma function is often referred to as the generalized factorial since z*gamma(z) = gamma(z+1) and gamma(n+1) = n! for natural number n.