NumpyTensor.__eq__¶
-
NumpyTensor.
__eq__
(self, other)[source]¶ Return
self == other
.- Returns
- equalsbool
True if all entries of
other
are equal to this the entries ofself
, False otherwise.
Examples
>>> space = odl.rn(3) >>> x = space.element([1, 2, 3]) >>> y = space.element([1, 2, 3]) >>> x == y True
>>> y = space.element([-1, 2, 3]) >>> x == y False >>> x == object False
Space membership matters:
>>> space2 = odl.tensor_space(3, dtype='int64') >>> y = space2.element([1, 2, 3]) >>> x == y or y == x False