mindspore.ops.angle

查看源文件
mindspore.ops.angle(input)[源代码]

逐元素计算输入tensor的辐角。

\[output_i = angle(input_i)\]
参数:
  • input (Tensor) - 输入tensor。

返回:

Tensor

支持平台:

Ascend GPU CPU

样例:

>>> import mindspore
>>> input = mindspore.tensor([-1 + 1j, -2 + 2j, 3 - 3j], mindspore.complex64)
>>> output = mindspore.ops.angle(input)*180/3.14159
>>> print(output)
[135.0001  135.0001  -45.00004]