TensorSpace.__eq__

TensorSpace.__eq__(self, other)[source]

Return self == other.

Returns
equalsbool

True if self and other have the same type, shape and dtype, otherwise False.

Examples

Sizes, data types and other essential properties characterize spaces and decide about equality:

>>> spc = odl.tensor_space(3, dtype='uint64')
>>> spc == spc
True
>>> spc2 = odl.tensor_space(3, dtype='uint64')
>>> spc2 == spc
True
>>> smaller_spc = odl.tensor_space(2, dtype='uint64')
>>> spc == smaller_spc
False
>>> other_dtype_spc = odl.tensor_space(3, dtype='uint32')
>>> spc == other_dtype_spc
False
>>> other_shape_spc = odl.tensor_space((3, 1), dtype='uint64')
>>> spc == other_shape_spc
False