NumpyTensorSpace.__eq__¶
- NumpyTensorSpace.__eq__(other)[source]¶
Return
self == other.- Returns:
- equalsbool
True if
otheris an instance oftype(self)with the sameNumpyTensorSpace.shape,NumpyTensorSpace.dtypeandNumpyTensorSpace.weighting, otherwise False.
Examples
>>> space = odl.rn(3) >>> same_space = odl.rn(3, exponent=2) >>> same_space == space True
Different
shape,exponentordtypeall 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