autodiff.Dual.__rpow__

Dual.__rpow__(other)

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

Parameters
selfDual
otherint, float
Returns
outDual

Examples

Scalar and dual number (univariate):

>>> 5 ** ad.Dual(2)
Dual(25, array([40.23594781]))

Scalar and dual number (multivariate):

>>> ad.Dual(2, [1]) ** 3
Dual(8, array([12]))

Two dual numbers (univariate):

>>> ad.Dual(2, [1, 2]) ** ad.Dual(3, [3, 4])
Dual(8, array([28.63553233, 46.18070978]))