Skip to contents

Element-wise logical NOT.

Usage

prim_not(x)

Arguments

x

(arrayish)
Arrayish value of data type boolean, integer, or unsigned integer.

Value

arrayish
Has the same shape and data type as the input. It is ambiguous if the input is ambiguous.

Implemented Rules

  • stablehlo

  • quickr

  • reverse

StableHLO

Lowers to hlo_not().

See also

Examples

x <- nv_array(c(TRUE, FALSE, TRUE))
prim_not(x)
#> AnvlArray
#>  0
#>  1
#>  0
#> [ CPUbool{3} ]