derivative of gamma function python