autodiff.Dual.__mul__

Dual.__mul__(other)

Return the product of self and other.

Parameters
selfDual
otherint, float, Dual
Returns
outDual

Examples

Dual number and scalar:

>>> ad.Dual(42) * 5
Dual(210, array([5]))

Two dual numbers (univariate):

>>> ad.Dual(5.6) * ad.Dual(1)
Dual(5.6, array([6.6]))

Two dual numbers (multivariate):

>>> ad.Dual(-9, [1, 2]) * ad.Dual(4, [2, -9])
Dual(-36, array([-14,  89]))