Skip to contents

Element-wise logical AND.

Usage

prim_and(lhs, rhs)

Arguments

lhs, rhs

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

See also

Examples

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