Prev Next

@(@\newcommand{\B}[1]{{\bf #1}} \newcommand{\R}[1]{{\rm #1}}@)@
Create an Independent Variable Vector

Syntax
a_x = independent(x)

Purpose
Creates an independent variable vector and starts recording operations involving objects that are instances of type(a_x[0]) . You must create an adfun object, or use abort_recording , to stop the recording before making another call to independent,

x
The argument x must be a numpy.array with one dimension (i.e., a vector). All the elements of x must all be of the same type and instances of either int, float or a_float.

a_x
The return value a_x is a numpy.array with the same shape as x . If the elements of x are instances of int or float the elements of a_x are instances of a_float. If the elements of x are instances of a_float the elements of a_x are instances of a2float. The value of the elements of a_x are equal to the corresponding elements of x .

Example
The file independent.py contains an example and test of this function.
Input File: pycppad/adfun.py