git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| import numpy as np | |
| import collections | |
| # These functions have been designed with numpy in mind. To | |
| # that end they take arrays as inputs and provide arrays as output | |
| def derivative(f): | |
| def df(x, h=0.1e-10): | |
| return np.array((f(x+h)-f(x-h))/(2*h)) | |
| return df |