Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 52 lines (40 sloc) 1.064 kB
4c9f542 @b45ch1 moved the crashing test from complicated tests to experimental tests …
authored
1 import _adolc
2 from _adolc import *
3 from wrapped_functions import *
8f57798 @b45ch1 added new, more convenient api: AdolcProgram that works similarly to…
authored
4 import cgraph
34a908d bugfix in interpolation
Sebastian Walter authored
5 import interpolation
4c9f542 @b45ch1 moved the crashing test from complicated tests to experimental tests …
authored
6
7 try:
8 import sparse
1a6c3fa adapted SConstruct.EXAMPLE to adolc 2.4.0
Sebastian Walter authored
9 except Exception as e:
ab272a9 @b45ch1 adapting sparse support for ADOL-C 2.1.5 to make it independent from …
authored
10 print 'adolc Notice: sparse drivers not available'
1a6c3fa adapted SConstruct.EXAMPLE to adolc 2.4.0
Sebastian Walter authored
11 print e
72ea6fc @b45ch1 added sparse jacobian and sparse hessian computation with colpack again,
authored
12 try:
13 import colpack
14
1a6c3fa adapted SConstruct.EXAMPLE to adolc 2.4.0
Sebastian Walter authored
15 except Exception as e:
72ea6fc @b45ch1 added sparse jacobian and sparse hessian computation with colpack again,
authored
16 print 'adolc Notice: colpack drivers not available'
1a6c3fa adapted SConstruct.EXAMPLE to adolc 2.4.0
Sebastian Walter authored
17 print e
4c9f542 @b45ch1 moved the crashing test from complicated tests to experimental tests …
authored
18
ab272a9 @b45ch1 adapting sparse support for ADOL-C 2.1.5 to make it independent from …
authored
19 # testing
20 from numpy.testing import Tester
21 test = Tester().test
4c9f542 @b45ch1 moved the crashing test from complicated tests to experimental tests …
authored
22
23 __doc__ = """
24 Adolc: Algorithmic Differentiation Software
25 see http://www.math.tu-dresden.de/~adol-c/ for documentation of Adolc
26 http://github.com/b45ch1/pyadolc/tree/master for more information and documentation of this Python extension
27
28 return values are always numpy arrays!
29
30 Example Session:
31 from numpy import *
32 from adolc import *
33 def vector_f(x):
34 \tV=vander(x)
35 \treturn dot(v,x)
36
37 x = arange(5,dtype=float)
38 ax = adouble(x)
39
40 trace_on(0)
41 independent(ax)
42 ay = vector_f(ax)
43 dependent(ay)
44 trace_off()
45
46 x = array([1.,4.,0.,0.,0.])
47 y = function(0,x)
48 J = jacobian(0,x)
49 """
50
51
Something went wrong with that request. Please try again.