![]() |
Prev | Next |
Manual split into sections | Manual as one web page | |
Math displayed using Latex |
pycppad.htm
| _printable.htm |
Math displayed using MathML |
pycppad.xml
| _printable.xml |
from pycppad import *
from pycppad import *
def pycppad_test_get_started() :
def F(x) : # function to be differentiated
return exp(-(x[0]**2. + x[1]**2.) / 2.) # is Gaussian density
x = numpy.array( [ 1., 2.] )
a_x = independent(x)
a_y = numpy.array( [ F(a_x) ] )
f = adfun(a_x, a_y)
J = f.jacobian(x) # J = F'(x)
assert abs( J[0, 0] + F(x) * x[0] ) < 1e-10 # J[0,0] ~= - F(x) * x[0]
assert abs( J[0, 1] + F(x) * x[1] ) < 1e-10 # J[0,1] ~= - F(x) * x[1]
_contents | Table of Contents |
install | Installing pycppad |
get_started.py | get_started: Example and Test |
example | List of All the pycppad Examples |
ad_variable | AD Variable Methods |
ad_function | AD Function Methods |
two_levels.py | Using Two Levels of AD: Example and Test |
runge_kutta_4 | Fourth Order Runge Kutta |
whats_new | Extensions, Bug Fixes, and Changes |
license | License |
_reference | Alphabetic Listing of Cross Reference Tags |
_index | Keyword Index |
_search | Search Python Algorithmic Differentiation Using CppAD |
_external | External Internet References |