# scipy.special.gammaln¶

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

Performs a logarithmic transformation of the values of the gamma function in one of two ways, depending on the input z:

1. z is not complex (i.e. z is a purely real number or it is array_like and contains purely real elements)

The natural logarithm of the absolute value of gamma(z) is computed. Thus, it is defined as:

ln(abs(gamma(z)))
1. z is complex (i.e. z is a complex number or it is array_like and contains at least one complex element)

The natural logarithm of gamma(z) is computed. Thus, it is defined as:

ln((gamma(z))