autodiff.Dual.__ne__¶
- Dual.__ne__(other)¶
Return element-wise (value and derivative vector) inequality comparison of
self
andother
.- Parameters
- selfDual
- otherint, float, Dual
- Returns
- outtuple
Examples
Dual number and scalar:
>>> ad.Dual(42) != 5 (True, array([True]))
Two dual numbers (univariate):
>>> ad.Dual(5, [2]) != ad.Dual(5, [1]) (False, array([True]))
Two dual numbers (multivariate):
>>> ad.Dual(2, [4, 2]) != ad.Dual(5, [1, 2]) (True, array([True, False]))