Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


torch (version 0.3.0)

torch_atan2: Atan2

Description

Atan2

Usage

torch_atan2(self, other)

Arguments

self

(Tensor) the first input tensor

other

(Tensor) the second input tensor

atan2(input, other, out=NULL) -> Tensor

Element-wise arctangent of inputi/otheri with consideration of the quadrant. Returns a new tensor with the signed angles in radians between vector (otheri,inputi) and vector (1,0). (Note that otheri, the second parameter, is the x-coordinate, while inputi, the first parameter, is the y-coordinate.)

The shapes of input and other must be broadcastable .

Examples

Run this code
# NOT RUN {
if (torch_is_installed()) {

a = torch_randn(c(4))
a
torch_atan2(a, torch_randn(c(4)))
}
# }

Run the code above in your browser using DataLab