Skip to content
fn

logical_or_op

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

Python wrappers

Public Python APIs implemented by this engine symbol.

Elementwise logical OR: yi=[ai≠0]∨[bi≠0]y_i = [a_i \ne 0] \lor [b_i \ne 0].

Composite over not_equal_op + bitwise_or_op. Not differentiable.

Math

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

See Also

bitwise_or_op — bit-level variant on integer inputs.

Parameters

a, bTensorImplPtr
Operands of broadcastable shapes.

Returns

TensorImplPtr

Bool tensor on the broadcast shape.