[frames] | no frames]

# Class DerivVar

source code

Numerical variable with automatic derivatives of first order

 Instance Methods

 __init__(self, value, index=0, order=1) source code
`list`
 __getitem__(self, order) Returns: a list of all derivatives of the given order source code

 __repr__(self) source code

 __str__(self) source code

 __coerce__(self, other) source code

 __cmp__(self, other) source code

 __neg__(self) source code

 __pos__(self) source code

 __abs__(self) source code

 __nonzero__(self) source code

 __sub__(self, other) source code

 __rsub__(self, other) source code

 __mul__(self, other) source code

 __rmul__(self, other) source code

 __truediv__(self, other) source code

 __div__(self, other) source code

 __floordiv__(self, other) source code

 __rdiv__(self, other) source code

 __pow__(self, other, z=None) source code

 __rpow__(self, other) source code

 exp(self) source code

 log(self) source code

 log10(self) source code

 sqrt(self) source code

 sign(self) source code

 sin(self) source code

 cos(self) source code

 tan(self) source code

 sinh(self) source code

 cosh(self) source code

 tanh(self) source code

 arcsin(self) source code

 arccos(self) source code

 arctan(self) source code

 arctan2(self, other) source code

 gamma(self) source code
 Method Details

### __init__(self, value, index=0, order=1)(Constructor)

source code
Parameters:
• `value` (number) - the numerical value of the variable
• `index` (`int`) - the variable index, which serves to distinguish between variables and as an index for the derivative lists. Each explicitly created instance of DerivVar must have a unique index.
• `order` (`int`) - the derivative order, must be zero or one
Raises:
• `ValueError` - if order < 0 or order > 1

### __getitem__(self, order)(Indexing operator)

source code
Parameters:
• `order` (`int`) - derivative order
Returns: `list`
a list of all derivatives of the given order
Raises:
• `ValueError` - if order < 0 or order > 1

 Generated by Epydoc 3.0.1 on Thu Jan 13 11:20:15 2011 http://epydoc.sourceforge.net