blakebullwinkel / cs207-FinalProject

VayDiff: A Python Package for Automatic Differentiation

Home Page:https://pypi.org/project/VayDiff/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VayDiff Build StatusCoverage Status

An Automatic Differentiation Library for Python 3. This project was done for CS207 at Harvard University, taught by Professor David Sondak. Check out our Documentation for more details!

How to Install

Installing via PyPI (for end-users)

Download our project on PyPI using the following command:

pip install VayDiff

Manual Installation (for developers)

Clone or download our GitHub repository and navigate into this directory in your terminal.

Optional: create a virtual environment using virtualenv. This can be downloaded using pip3 or easy_install as follows:

pip3 install virtualenv

or

sudo easy_install virtualenv

Then, create a virtual environment (using Python3), activate this virtual environment, and install the dependencies as follows:

virtualenv -p python3 my_env
source my_env/bin/activate
pip3 install -r requirements.txt

In order to deactivate the virtual environment, use the following command

deactivate

Example

from VayDiff.VayDiff import Variable
from VayDiff.VayDiff import Diff

def user_function(a):
  return a**2

x = Variable(3, name='x')
t = Diff().auto_diff(user_function, [x])
print(t.val, t.der['x'])
9 6.0

Fractals!

newton_fractal

Look at our Feature section for examples and more fractals.

Made By:

  1. Abhimanyu Vasishth
  2. Zheyu Wu
  3. Yiming Xu

About

VayDiff: A Python Package for Automatic Differentiation

https://pypi.org/project/VayDiff/

License:MIT License


Languages

Language:Python 100.0%