![]() |
Prev | Next |
a_x = ad(x)
a_x
that records floating point operations.
An adfun
object can later use this recording to evaluate
function values and derivatives. These later evaluations are done
using the same type as
x
(except when
x
is an instance of int
,
the later evaluations are done using float
operations).
x
can be an instance of an int
(AD level 0),
or an instance of float
(AD level 0),
or an a_float
(AD level 1).
The argument
x
may also be a numpy.array
with one of the
element types listed in the previous sentence.
x
is an instance of int
or float
,
a_x
is an a_float
(AD level 1).
If
x
is an a_float
,
a_x
is an a2float
(AD level 2).
If
x
is an numpy.array
,
a_x
is also an numpy.array
with the
same shape as
x
.