Skip to content
fn

logical_not_op

→TensorImplPtr
int logical_not_op(const int & a)

Python wrappers

Public Python APIs implemented by this engine symbol.

Elementwise logical NOT: yi=[ai=0]y_i = [a_i = 0].

Composite over equal_op against zero — strictly cheaper than the double-flip bitwise_not(not_equal(a, 0)) pattern. Not differentiable.

Math

yi=1 ⁣[ai=0] y_i = \mathbb{1}\!\left[ a_i = 0 \right]

See Also

logical_and_op, logical_or_op.

Parameters

aTensorImplPtr
Operand of arbitrary numeric dtype.

Returns

TensorImplPtr

Bool tensor of the same shape as a.