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.

dpnp.isneginf

Test element-wise for negative infinity, return result as bool array.

dpnp.isposinf

Test element-wise for positive infinity, return result as bool array.

Array type testing

dpnp.iscomplex

Returns a bool array, where True if input element is complex.

dpnp.iscomplexobj

Check for a complex type or an array of complex numbers.

dpnp.isfortran

Check if the array is Fortran contiguous but not C contiguous.

dpnp.isreal

Returns a bool array, where True if input element is real.

dpnp.isrealobj

Return True if x is a not complex type or an array of complex numbers.

dpnp.isscalar

Returns True if the type of element 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.array_equiv

Returns True if input arrays are shape consistent and all elements equal.

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.