Skip to contents

Element-wise atan2 operation.

Usage

prim_atan2(lhs, rhs)

Arguments

lhs, rhs

(arrayish)
Arrayish values of data type floating-point. Must have the same shape.

Value

arrayish
Has the same shape and data type as the inputs. It is ambiguous if both inputs are ambiguous.

Implemented Rules

  • stablehlo

  • reverse

StableHLO

Lowers to stablehlo::hlo_atan2().

See also

Examples

y <- nv_array(c(1, 0, -1))
x <- nv_array(c(0, 1, 0))
prim_atan2(y, x)
#> AnvlArray
#>   1.5708
#>   0.0000
#>  -1.5708
#> [ CPUf32{3} ]