mindspore.ops.angle
- mindspore.ops.angle(input)[source]
Returns the element-wise argument of a complex tensor. The elements in input are considered to be complex numbers of the form a+bj, where a is the real part and b is the imaginary part. The argument returned by this function is of the form \(atan2(b, a)\).
- Parameters
input (Tensor) – The input tensor. types: complex64, complex128.
- Returns
Tensor, has the float32 or float64 type and the same shape as input.
- Raises
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> input = Tensor([-1.5 + 7.8j, 3 + 5.75j], mindspore.complex64) >>> output = ops.angle(input) >>> print(output) [1.7607845 1.0899091]