View source: R/gen-namespace.R
torch_atan2 | R Documentation |
Atan2
torch_atan2(self, other)
self |
(Tensor) the first input tensor |
other |
(Tensor) the second input tensor |
Element-wise arctangent of \mbox{input}_{i} / \mbox{other}_{i}
with consideration of the quadrant. Returns a new tensor with the signed angles
in radians between vector (\mbox{other}_{i}, \mbox{input}_{i})
and vector (1, 0)
. (Note that \mbox{other}_{i}
, the second
parameter, is the x-coordinate, while \mbox{input}_{i}
, the first
parameter, is the y-coordinate.)
The shapes of input
and other
must be
broadcastable .
if (torch_is_installed()) {
a = torch_randn(c(4))
a
torch_atan2(a, torch_randn(c(4)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.