Skip to contents

Raises lhs to the power of rhs element-wise.

Usage

prim_pow(lhs, rhs)

Arguments

lhs, rhs

(arrayish)
Arrayish values of data type integer, unsigned integer, or 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

  • quickr

  • reverse

StableHLO

Lowers to stablehlo::hlo_power().

See also

Examples

x <- nv_array(c(2, 3, 4))
y <- nv_array(c(3, 2, 1))
prim_pow(x, y)
#> AnvlArray
#>  8
#>  9
#>  4
#> [ CPUf32{3} ]