Logic Functions

Truth value testing

dpnp.all

Test whether all array elements along a given axis evaluate to True.

dpnp.any

Test whether any array element along a given axis evaluates to True.

Infinities and NaNs

dpnp.isfinite

Test if each element of input array is a finite number.

dpnp.isinf

Test if each element of input array is an infinity.

dpnp.isnan

Test if each element of an input array is a NaN.

Array type testing

dpnp.isscalar

Returns True if the type of obj is a scalar type.

Logic operations

dpnp.logical_and

Computes the logical AND for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

dpnp.logical_or

Computes the logical OR for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

dpnp.logical_not

Computes the logical NOT for each element x_i of input array x.

dpnp.logical_xor

Computes the logical XOR for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

Comparison

dpnp.allclose

Returns True if two arrays are element-wise equal within a tolerance.

dpnp.isclose

Returns a boolean array where two arrays are element-wise equal within a tolerance.

dpnp.array_equal

True if two arrays have the same shape and elements, False otherwise.

dpnp.greater

Computes the greater-than test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

dpnp.greater_equal

Computes the greater-than or equal-to test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

dpnp.less

Computes the less-than test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

dpnp.less_equal

Computes the less-than or equal-to test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

dpnp.equal

Calculates equality test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

dpnp.not_equal

Calculates inequality test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.