Prev | Next |

@(@\newcommand{\B}[1]{{\bf #1}} \newcommand{\R}[1]{{\rm #1}}@)@

Syntax

Purpose

f

x

J

Example

*J* = *f*.jacobian(*x*)

This routine computes the entire derivative @(@ F^{(1)} (x) @)@ where @(@ F : \B{R}^n \rightarrow \B{R}^m @)@ is the function corresponding to the

`adfun`

object f
.
The object

*f*

must be an adfun
object.
We use level
for the AD ad
level of
this object.
The argument

*x*

is a `numpy.array`

with one dimension
(i.e., a vector) with length equal to the domain size n
for the function
*f*

.
It specifies the argument value at which the derivative is computed.
If the AD level
for
*f*

is zero,
all the elements of
*x*

must be either `int`

or instances
of `float`

.
If the AD level
for
*f*

is one,
all the elements of
*x*

must be `a_float`

objects.
The return value

*J*

is a `numpy.array`

with two dimensions
(i.e., a matrix).
The first dimension (row size) is equal to m
(the number of range components in the function
*f*

).
The second dimension (column size) is equal to n
(the number of domain components in the function
*f*

).
It is set to the derivative; i.e.,
@[@
J = F^{(1)} (x)
@]@
If the AD level
for
*f*

is zero,
all the elements of
*J*

will be instances of `float`

.
If the AD level
for
*f*

is one,
all the elements of
*J*

will be `a_float`

objects.
The file jacobian.py contains an example and test of this operation.

Input File: pycppad/adfun.cpp