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.1.0.tar.gz (148.8 kB view hashes)

Uploaded source

Built Distribution

mygrad-2.1.0-py3-none-any.whl (170.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page