autodiff.Dual.__radd__

Dual.__radd__(other)

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

Parameters
selfDual
otherint, float
Returns
outDual

Examples

Scalar and dual number (univariate):

>>> 1.2 + ad.Dual(42)
Dual(43.2, array([1]))

Scalar and dual number (multivariate):

>>> -3.6 + ad.Dual(42, [1, 2])
Dual(38.4, array([1, 2]))