https://github.com/quansight-labs/udiff
Automatic differentiation with uarray/unumpy.
https://github.com/quansight-labs/udiff
Last synced: 5 months ago
JSON representation
Automatic differentiation with uarray/unumpy.
- Host: GitHub
- URL: https://github.com/quansight-labs/udiff
- Owner: Quansight-Labs
- License: bsd-3-clause
- Created: 2019-10-01T17:24:43.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-07T13:26:55.000Z (over 4 years ago)
- Last Synced: 2025-04-02T08:06:29.725Z (6 months ago)
- Language: Python
- Size: 1.56 MB
- Stars: 16
- Watchers: 6
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# `udiff` - Automatic differentiation with uarray/unumpy.
[](https://gitter.im/Plures/uarray?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)  ## Quickstart
```python
import uarray as ua
import unumpy as np
import udiff
from unumpy import numpy_backendwith 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`](CONTRIBUTING.md) for more information on how to contribute to `udiff`.