Skip to content
fn

logical_xor_op

→TensorImplPtr
int logical_xor_op(const int & a, const int & b)

Python wrappers

Public Python APIs implemented by this engine symbol.

Elementwise logical XOR: yi=[ai≠0]⊕[bi≠0]y_i = [a_i \ne 0] \oplus [b_i \ne 0].

Composite over not_equal_op + bitwise_xor_op. Not differentiable.

Math

yi=1 ⁣[(ai≠0)≠(bi≠0)] y_i = \mathbb{1}\!\left[ (a_i \ne 0) \ne (b_i \ne 0) \right]

See Also

bitwise_xor_op — bit-level variant.

Parameters

a, bTensorImplPtr
Operands of broadcastable shapes.

Returns

TensorImplPtr

Bool tensor on the broadcast shape.