Skip to content

Quansight-Labs/udiff

udiff - Automatic differentiation with uarray/unumpy.

Join the chat at https://gitter.im/Plures/uarray language license

Quickstart

import uarray as ua
import unumpy as np
import udiff
from unumpy import numpy_backend

with ua.set_backend(udiff.DiffArrayBackend(numpy_backend), coerce=True):
    x1 = np.reshape(np.arange(1, 26), (5, 5))
    x2 = np.reshape(np.arange(1, 26), (5, 5))
    y = np.log(x1) + x1 * x2 - np.sin(x2)
    print(y)
    print(y.to(x1))
    print(y.to(x2))

Contributing

See CONTRIBUTING.md for more information on how to contribute to udiff.

About

Automatic differentiation with uarray/unumpy.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages