NumpyTensor.conj

NumpyTensor.conj(self, out=None)[source]

Return the complex conjugate of self.

Parameters
outNumpyTensor, optional

Element to which the complex conjugate is written. Must be an element of self.space.

Returns
outNumpyTensor

The complex conjugate element. If out was provided, the returned object is a reference to it.

Examples

>>> space = odl.cn(3)
>>> x = space.element([1 + 1j, 2, 3 - 3j])
>>> x.conj()
cn(3).element([ 1.-1.j,  2.-0.j,  3.+3.j])
>>> out = space.element()
>>> result = x.conj(out=out)
>>> result
cn(3).element([ 1.-1.j,  2.-0.j,  3.+3.j])
>>> result is out
True

In-place conjugation:

>>> result = x.conj(out=x)
>>> x
cn(3).element([ 1.-1.j,  2.-0.j,  3.+3.j])
>>> result is x
True