Skip to main content

An automatic differentiation package

Project description

Welcome to PyADBCXY

build codecov

PyADBCXY is an automatic differentiation software package that can calculate the values and derivatives of complex functions while maintaining high levels of accuracy.

Contributors

Group Name: cs107-BCXY
Group Number: 12
Group Members:

Installation

Install the package with pip:

pip install pyadbcxy

Then you can run a simple example such as

import pyadbcxy as ad
x = ad.Variable(3)            # instantiate x variable
y = ad.Variable(4., 5.)       # instantiate y variable
f = lambda x, y: x + y        # define function of interest
fmode = ad.Forward(f, (x, y)) # instantiate forward mode
fmode.calculate()             # evaluate function at x and y
print(fmode.value)            # print value of f at x and y
print(fmode.derivative)       # print derivative of f and x and y

For further details on package usage as well as the math behind it, please see the documentation.

For developers

To install the package for further development, clone the repository to your machine:

git clone https://github.com/cs107-BCXY/cs107-FinalProject.git

Then, move into the repository and install the package dependencies

cd cs107-FinalProject
pip install -r requirements.txt

Testing

To run the tests, you can execute

python -m unittest discover -s tests -p 'test_*.py'

Alternatively, you can run the test driver script. The default testing framework is unittest and can be run with:

bash tests/run_tests.sh

If you'd like to execute the tests using pytest, simply specify in the command:

bash tests/run_tests.sh pytest

Finally, if you'd like to see the code coverage report, you can do so with the coverage keyword:

bash tests/run_tests.sh coverage

License

This project is licensed under the MIT License - see the LICENSE for more details.

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

pyadbcxy-0.0.4.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyadbcxy-0.0.4-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file pyadbcxy-0.0.4.tar.gz.

File metadata

  • Download URL: pyadbcxy-0.0.4.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for pyadbcxy-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4dc466a28e7dd2a8d4544c859b0cef4772037301db8d52d300267e95d27bada1
MD5 32d1cfa6d8e0412aa6e899cb77a2f3af
BLAKE2b-256 39e496f58dc66de2dd0569f45c690ee8d2798b0cd12ecaaf79da57ac4c3fd6ab

See more details on using hashes here.

File details

Details for the file pyadbcxy-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pyadbcxy-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for pyadbcxy-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 43a711bec914f9baf4a995c07f369fcb5950b4df5fc8a3a367400c0de0298ad5
MD5 c27e55bec1d553323b0b25c83e75d228
BLAKE2b-256 84c9167078962994c6a709bf7d0cc5ef3abd25a2107c949808a6b58fe2be3f1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page