Prev Next

@(@\newcommand{\B}[1]{{\bf #1}} \newcommand{\R}[1]{{\rm #1}}@)@
Unary Plus and Minus Operators

Syntax
y = + x
y = - x

Purpose
The operator + ( - ) above results in z equal to x (minus x ).

Type
The argument x can be a_float or a2float and the result z will have the same type as x .

Arrays
The argument x may be a numpy.array with elements of type a_float or a2float. In this case, the result z is an array with the same shape and element type as x .

Example
The file ad_unary.py contains an example and test of these functions.
Input File: pycppad/pycppad.cpp