Skip to main content

Autograd compatible approximations to the gamma family of functions

Project description


PyPI version

autograd compatible approximations to the derivatives of the Gamma-family of functions.


from autograd import grad
from autograd_gamma import gammainc, gammaincc, gammaincln, gammainccln

grad(gammainc, argnum=0)(1., 2.)
grad(gammaincc, argnum=0)(1., 2.)

# logarithmic functions too.
grad(gammaincln, argnum=0)(1., 2.)
grad(gammainccln, argnum=0)(1., 2.)

from autograd_gamma import betainc, betaincln

grad(betainc, argnum=0)(1., 2., 0.5)
grad(betainc, argnum=1)(1., 2., 0.5)

# logarithmic functions too.
grad(betaincln, argnum=0)(1., 2., 0.5)
grad(betaincln, argnum=1)(1., 2., 0.5)

Long-term goal

Build and improve upon the derivative of the upper and lower incomplete gamma functions. Eventually, if we have a fast analytical solution, we will merge into the autograd library.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autograd-gamma-0.4.1.tar.gz (2.5 kB view hashes)

Uploaded source

Built Distributions

autograd_gamma-0.4.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded py3

autograd_gamma-0.4.1-py2.py3-none-any.whl (3.7 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page