On this page
Logic functions
Truth value testing
| 
 | Test whether all array elements along a given axis evaluate to True. | 
| 
 | Test whether any array element along a given axis evaluates to True. | 
Array contents
| 
 | Test element-wise for finiteness (not infinity or not Not a Number). | 
| 
 | Test element-wise for positive or negative infinity. | 
| 
 | Test element-wise for NaN and return result as a boolean array. | 
| 
 | Test element-wise for NaT (not a time) and return result as a boolean array. | 
| 
 | Test element-wise for negative infinity, return result as bool array. | 
| 
 | Test element-wise for positive infinity, return result as bool array. | 
Array type testing
| 
 | Returns a bool array, where True if input element is complex. | 
| 
 | Check for a complex type or an array of complex numbers. | 
| 
 | Check if the array is Fortran contiguous but not C contiguous. | 
| 
 | Returns a bool array, where True if input element is real. | 
| 
 | Return True if x is a not complex type or an array of complex numbers. | 
| 
 | Returns True if the type of  | 
Logical operations
| 
 | Compute the truth value of x1 AND x2 element-wise. | 
| 
 | Compute the truth value of x1 OR x2 element-wise. | 
| 
 | Compute the truth value of NOT x element-wise. | 
| 
 | Compute the truth value of x1 XOR x2, element-wise. | 
Comparison
| 
 | Returns True if two arrays are element-wise equal within a tolerance. | 
| 
 | Returns a boolean array where two arrays are element-wise equal within a tolerance. | 
| 
 | True if two arrays have the same shape and elements, False otherwise. | 
| 
 | Returns True if input arrays are shape consistent and all elements equal. | 
| 
 | Return the truth value of (x1 > x2) element-wise. | 
| 
 | Return the truth value of (x1 >= x2) element-wise. | 
| 
 | Return the truth value of (x1 < x2) element-wise. | 
| 
 | Return the truth value of (x1 =< x2) element-wise. | 
| 
 | Return (x1 == x2) element-wise. | 
| 
 | Return (x1 != x2) element-wise. | 
© 2005–2020 NumPy Developers
Licensed under the 3-clause BSD License.
 https://numpy.org/doc/1.19/reference/routines.logic.html