ProductSpaceElement.real¶
-
property
ProductSpaceElement.
real
¶ Real part of the element.
The real part can also be set using
x.real = other
, whereother
is array-like or scalar.Examples
>>> space = odl.ProductSpace(odl.cn(3), odl.cn(2)) >>> x = space.element([[1 + 1j, 2, 3 - 3j], ... [-1 + 2j, -2 - 3j]]) >>> x.real ProductSpace(rn(3), rn(2)).element([ [ 1., 2., 3.], [-1., -2.] ])
The real part can also be set using different array-like types:
>>> x.real = space.real_space.zero() >>> x ProductSpace(cn(3), cn(2)).element([ [ 0.+1.j, 0.+0.j, 0.-3.j], [ 0.+2.j, 0.-3.j] ])
>>> x.real = 1.0 >>> x ProductSpace(cn(3), cn(2)).element([ [ 1.+1.j, 1.+0.j, 1.-3.j], [ 1.+2.j, 1.-3.j] ])
>>> x.real = [[2, 3, 4], [5, 6]] >>> x ProductSpace(cn(3), cn(2)).element([ [ 2.+1.j, 3.+0.j, 4.-3.j], [ 5.+2.j, 6.-3.j] ])