Learn R Programming

torch (version 0.0.2)

torch_angle: Angle

Description

Angle

Arguments

input

(Tensor) the input tensor.

out

(Tensor, optional) the output tensor.

angle(input, out=None) -> Tensor

Computes the element-wise angle (in radians) of the given input tensor.

$$ \mbox{out}_{i} = angle(\mbox{input}_{i}) $$

Examples

Run this code
# NOT RUN {
if (torch_is_installed()) {
# }
# NOT RUN {
torch_angle(torch_tensor(c(-1 + 1i, -2 + 2i, 3 - 3i)))*180/3.14159
# }
# NOT RUN {
}
# }

Run the code above in your browser using DataLab