Skip to main content

Brings drop-in automatic differentiation to NumPy

Project description

MyGrad is a lightweight library that adds automatic differentiation to NumPy – its only dependency is NumPy! It’s primary goal is to make automatic differentiation an accessible and easy to use across the Python/NumPy ecosystem.

MyGrad introduces a tensor object, which behaves like NumPy’s ndarray object, but that builds a computational graph, which enables MyGrad to perform reverse-mode differentiation (i.e. “backpropagation”). By exploiting NumPy’s mechanisms for ufunc/function overrides, MyGrad’s tensor works “natively” with NumPy’s suite of mathematical functions so that they can be chained together into a differentiable computational graph.

NumPy’s systems for broadcasting operations, producing views of arrays, performing in-place operations, and permitting both “basic” and “advanced” indexing of arrays are all supported by MyGrad to a high-fidelity.

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

mygrad-2.2.0.tar.gz (149.0 kB view hashes)

Uploaded Source

Built Distribution

mygrad-2.2.0-py3-none-any.whl (170.4 kB view hashes)

Uploaded Python 3

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