LinearSpaceElement.__eq__¶
- LinearSpaceElement.__eq__(other)[source]¶
Return
self == other.Two elements are equal if their distance is zero.
- Parameters:
- other
LinearSpaceElement Element of this space.
- other
- Returns:
- equalsbool
Trueif the elements are equalFalseotherwise.
See also
Notes
Equality is very sensitive to numerical errors, thus any arithmetic operations should be expected to break equality.
Examples
>>> rn = odl.rn(1, norm=np.linalg.norm) >>> x = rn.element([0.1]) >>> x == x True >>> y = rn.element([0.1]) >>> x == y True >>> z = rn.element([0.3]) >>> x + x + x == z False