Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 893 Bytes

README.md

File metadata and controls

22 lines (18 loc) · 893 Bytes

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.