autodiff.reverse.Node.__gt__¶
- Node.__gt__(other)¶
Return element-wise (value and derivative) greater than comparison of self and other.
- Parameters
- selfNode
- otherint, float, Node
- Returns
- outtuple
Notes
If either other or self has None der. We return None for the derivative comparison and give user a warning indicating that they are attempting to compare two Nodes before their derivatives are computed.
Examples
>>> ad.Node.constant(42) > ad.Node.constant(5) (True, False) >>> ad.Node.constant(42) > ad.Node.constant(50) (False, False)
Warning before derivatives are computed:
>>> ad.Node(42) > 5 RuntimeWarning: Attempting to compare two nodes with None derivatives (True, None)