Dual

Constructor

Dual(val[, der])

Primary data structure for forward mode automatic differentiation.

Dunder Methods

Dual.__add__(other)

Return the sum of self and other.

Dual.__radd__(other)

Return the sum of two numbers, when the left operand is not a Dual number.

Dual.__sub__(other)

Returns the difference between self and other.

Dual.__rsub__(other)

Return the difference between two numbers, when the left operand is not a Dual number.

Dual.__mul__(other)

Return the product of self and other.

Dual.__rmul__(other)

Return the product of two numbers, when the left operand is not a Dual number.

Dual.__truediv__(other)

Return the quotient of self and other.

Dual.__rtruediv__(other)

Return the quotient of two numbers, when the left operand is not a Dual number.

Dual.__pow__(other)

Return self to the power of other.

Dual.__rpow__(other)

Return other to the power of self if other is not a Dual number.

Dual.__neg__()

Return negation of self.

Dual.__lt__(other)

Return element-wise (value and derivative vector) less than comparison of self and other.

Dual.__gt__(other)

Return element-wise (value and derivative vector) greater than comparison of self and other.

Dual.__le__(other)

Return element-wise (value and derivative vector) less than or equal to comparison of self and other.

Dual.__ge__(other)

Return element-wise (value and derivative vector) greater than or equal to comparison of self and other.

Dual.__eq__(other)

Return element-wise (value and derivative vector) equality comparison of self and other.

Dual.__ne__(other)

Return element-wise (value and derivative vector) inequality comparison of self and other.