ProductSpaceElement.imag¶
-
property
ProductSpaceElement.
imag
¶ Imaginary part of the element.
The imaginary part can also be set using
x.imag = 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.imag ProductSpace(rn(3), rn(2)).element([ [ 1., 0., -3.], [ 2., -3.] ])
The imaginary part can also be set using different array-like types:
>>> x.imag = space.real_space.zero() >>> x ProductSpace(cn(3), cn(2)).element([ [ 1.+0.j, 2.+0.j, 3.+0.j], [-1.+0.j, -2.+0.j] ])
>>> x.imag = 1.0 >>> x ProductSpace(cn(3), cn(2)).element([ [ 1.+1.j, 2.+1.j, 3.+1.j], [-1.+1.j, -2.+1.j] ])
>>> x.imag = [[2, 3, 4], [5, 6]] >>> x ProductSpace(cn(3), cn(2)).element([ [ 1.+2.j, 2.+3.j, 3.+4.j], [-1.+5.j, -2.+6.j] ])