mindspore.ops.adjoint

View Source On Gitee
mindspore.ops.adjoint(x)[source]

Calculates the conjugation of Tensor element by element, and transposes the last two dimensions.

Parameters

x (Tensor) – Input Tensor.

Returns

Tensor, the calculated result.

Raises

TypeError – If x is not a Tensor.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor, ops
>>> a = Tensor(np.array([[0. + 0.j, 1. + 1.j], [2. + 2.j, 3. + 3.j]]), mindspore.complex128)
>>> output = ops.adjoint(a)
>>> print(output)
[[0.-0.j 2.-2.j]
 [1.-1.j 3.-3.j]]