autodiff.reverse.Node.__ne__¶
- Node.__ne__(other)¶
Return element-wise (value and derivative vector) inequality 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(42) (False, False)
Warning before derivatives are computed:
>>> ad.Node(42) != 5 RuntimeWarning: Attempting to compare two nodes with None derivatives (True, None)