Logic Functions

Truth value testing

cupy.all Tests whether all array elements along a given axis evaluate to True.
cupy.any Tests whether any array elements along a given axis evaluate to True.

Infinities and NaNs

cupy.isfinite Tests finiteness elementwise.
cupy.isinf Tests if each element is the positive or negative infinity.
cupy.isnan Tests if each element is a NaN.

Array type testing

cupy.isscalar Returns True if the type of num is a scalar type.
cupy.iscomplex Returns a bool array, where True if input element is complex.
cupy.iscomplexobj Check for a complex type or an array of complex numbers.
cupy.isfortran Returns True if the array is Fortran contiguous but not C contiguous.
cupy.isreal Returns a bool array, where True if input element is real.
cupy.isrealobj Return True if x is a not complex type or an array of complex numbers.

Logic operations

cupy.logical_and Computes the logical AND of two arrays.
cupy.logical_or Computes the logical OR of two arrays.
cupy.logical_not Computes the logical NOT of an array.
cupy.logical_xor Computes the logical XOR of two arrays.

Comparison operations

cupy.greater Tests elementwise if x1 > x2.
cupy.greater_equal Tests elementwise if x1 >= x2.
cupy.less Tests elementwise if x1 < x2.
cupy.less_equal Tests elementwise if x1 <= x2.
cupy.equal Tests elementwise if x1 == x2.
cupy.not_equal Tests elementwise if x1 != x2.