autodiff.reverse.Node.__rsub__

Node.__rsub__(other)

Return the difference between two numbers, when the left operand is not Node

Parameters
selfNode
otherint, float
Returns
outNode

Examples

Scalar and Node:

>>> 1.2 - ad.Node(42)
Node(-40.8)
>>> -3.6 - ad.Node.constant(42)
Node(-45.6)