Prev Next Index-> contents reference index search external Up-> pycppad ad_function jacobian pycppad-> install get_started.py example ad_variable ad_function two_levels.py runge_kutta_4 whats_new license ad_function-> independent adfun abort_recording forward reverse jacobian hessian optimize jacobian-> jacobian.py Headings-> Syntax Purpose f x J Example

Driver for Computing Entire Derivative

Syntax
J = f.jacobian(x)

Purpose
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 .

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

x
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.

J
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.

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