autodiff.reverse.Node.__le__¶
- Node.__le__(other)¶
Return element-wise (value and derivative) less than or equal 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) (False, True) >>> ad.Node.constant(42) <= ad.Node.constant(50) (True, True)
Warning before derivatives are computed:
>>> ad.Node(42) <= 5 RuntimeWarning: Attempting to compare two nodes with None derivatives (False, None)