Skip to content
fn

less_equal_op

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

Python wrappers

Public Python APIs implemented by this engine symbol.

Element-wise less-than-or-equal comparison.

Computes out[i] = (a[i] <= b[i]) and returns the result as a Bool tensor.

Non-differentiable: no autograd node is registered.

Math

out[i]=1 ⁣[a[i]≤b[i]]. \mathrm{out}[i] = \mathbf{1}\!\left[a[i] \leq b[i]\right].

References

NumPy numpy.less_equal.

See Also

less_op, greater_equal_op

Parameters

a, bTensorImplPtr
Operands of identical shape, dtype, and device.

Returns

TensorImplPtr

Bool tensor with the same shape as the inputs.

Raises

LucidError
If the operand shapes, dtypes, or devices differ.