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.5.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.5-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyadbcxy-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 40c9ae821ca4bf8097f9f656e25f7fcf69b89fd4d9a5b60e033732d8fb88d975
MD5 18f79ab9a20dc3ca4c97f2386b211bb3
BLAKE2b-256 79730b63fc4c09d65bab6f6ce745ebce75fa443ded472dee1beadc58edc17847

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyadbcxy-0.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fd55952a961c789c576dcbd154897c49ef84fd0dceb81e00a9bbd0af868bf71c
MD5 658cf788891321864e45e9abcdb07a0e
BLAKE2b-256 6b7c988a5cf0d3b33283d75194bd2ec5b9f394a76d81553fb6f8ade9c37b81a3

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