Logic

Collection of logic Ivy functions.

ivy.logical_and(x1, x2, f=None)[source]

Computes the truth value of x1 AND x2 element-wise.

Parameters
  • x1 (array) – Input array 1.

  • x2 (array) – Input array 2.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

Boolean result of the logical AND operation applied element-wise to x1 and x2.

ivy.logical_not(x, f=None)[source]

Computes the truth value of NOT x element-wise.

Parameters
  • x (array) – Input array 1.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

Boolean result of the logical OR operation applied element-wise to x1 and x2.

ivy.logical_or(x1, x2, f=None)[source]

Computes the truth value of x1 OR x2 element-wise.

Parameters
  • x1 (array) – Input array 1.

  • x2 (array) – Input array 2.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

Boolean result of the logical OR operation applied element-wise x1 and x2.