# Logic Functions¶

## Infinities and NaNs¶

cupy.isfinite = <ufunc 'cupy_isfinite'>

Tests finiteness elementwise.

Each element of returned array is True only if the corresponding element of the input is finite (i.e. not an infinity nor NaN).

cupy.isinf = <ufunc 'cupy_isinf'>

Tests if each element is the positive or negative infinity.

cupy.isnan = <ufunc 'cupy_isnan'>

Tests if each element is a NaN.

## Logic operations¶

cupy.logical_and = <ufunc 'cupy_logical_and'>

Computes the logical AND of two arrays.

cupy.logical_or = <ufunc 'cupy_logical_or'>

Computes the logical OR of two arrays.

cupy.logical_not = <ufunc 'cupy_logical_not'>

Computes the logical NOT of an array.

cupy.logical_xor = <ufunc 'cupy_logical_xor'>

Computes the logical XOR of two arrays.

## Comparison operations¶

cupy.greater = <ufunc 'cupy_greater'>

Tests elementwise if x1 > x2.

cupy.greater_equal = <ufunc 'cupy_greater_equal'>

Tests elementwise if x1 >= x2.

cupy.less = <ufunc 'cupy_less'>

Tests elementwise if x1 < x2.

cupy.less_equal = <ufunc 'cupy_less_equal'>

Tests elementwise if x1 <= x2.

cupy.equal = <ufunc 'cupy_equal'>

Tests elementwise if x1 == x2.

cupy.not_equal = <ufunc 'cupy_not_equal'>

Tests elementwise if x1 != x2.