Prev | Next |

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

Syntax

Purpose

x

a_x

Example

*a_x* = independent(*x*)

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`

,
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`

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

.
The file independent.py contains an example and test of this function.

Input File: pycppad/adfun.py