NumpyTensorSpace.__eq__¶
-
NumpyTensorSpace.
__eq__
(self, other)[source]¶ Return
self == other
.- Returns
- equalsbool
True if
other
is an instance oftype(self)
with the sameNumpyTensorSpace.shape
,NumpyTensorSpace.dtype
andNumpyTensorSpace.weighting
, otherwise False.
Examples
>>> space = odl.rn(3) >>> same_space = odl.rn(3, exponent=2) >>> same_space == space True
Different
shape
,exponent
ordtype
all result in different spaces:>>> diff_space = odl.rn((3, 4)) >>> diff_space == space False >>> diff_space = odl.rn(3, exponent=1) >>> diff_space == space False >>> diff_space = odl.rn(3, dtype='float32') >>> diff_space == space False >>> space == object False