Logical Operations

16 tutorials Updated 21 Nov 2024

  1. 1 The all() function of numpy The all() function of NumPy module condenses the columns and rows of an ndarray by applying logical AND operation. When axis=0, logical AND is applied column-wise; When axis=1, AND is applied row-wise. 19 Oct 2024
  2. 2 The any() function of NumPy The NumPy any() function reduces an ndarray by applying logical or in column-wise, row-wise and for the entire array, based on the value of the axis parameter. 20 Oct 2024
  3. 3 The equal() function of NumPy module The equal() function of NumPy does an element-wise comparison of two numpy array-likes and returns the result as a Boolean array. The result is a single Boolean value when input parameters are scalars. 26 Oct 2024
  4. 4 The greater() function of NumPy module The greater() function of Python NumPy module does an element-wise comparison of two array-like instances using the relation e1 > e2. The results are returned as an ndarray of Booleans. 8 Nov 2024
  5. 5 The iscomplex() function of NumPy module The iscomplex() function of NumPy module checks each element of a NumPy array-like whether it is a complex number and returns the result in a Boolean array. 24 Oct 2024
  6. 6 The iscomplexobj() function of NumPy module The iscomplexobj() function of NumPy module returns True when a NumPy scalar is of type complex or when at least one element in a container is a complex number. 21 Nov 2024
  7. 7 The isfinite() function of NumPy The function numpy.isfinite() checks each element of an array-like for infinity and returns the results in an ndarray of Booleans. If the input is a scalar a Boolean value is returned. 20 Oct 2024
  8. 8 The isinf() function of NumPy The isinf() function of NumPy module, checks each element of an ndarray or a NumPy array-like for infinity and returns the results as an ndarray containing Boolean values (True and False). 21 Oct 2024
  9. 9 The isnan() function of NumPy The isnan() function checks the elements of a numpy array-like for "not a number" and returns the results as an ndarray of Boolean values. 22 Oct 2024
  10. 10 The isnat() function of numpy module The isnat() function of the NumPy module checks for valid timestamps in a NumPy array-like and returns the a Boolean ndarray containing the results. The function works only on timestamps of type numpy.datetime64 and numpy.timedelta64. 22 Oct 2024
  11. 11 The isneginf() function of NumPy module The NumPy function isneginf() checks a numpy-arraylike elements whether they conform to negative infinity. A negative infinity is less than any real number. 27 Oct 2024
  12. 12 The isposinf() function of NumPy module The function isposinf() of NumPy module checks the elements of a numpy array-like for positive infinity. Positive infinity is bigger than any known real number. 30 Oct 2024
  13. 13 The isreal() function of NumPy module The isreal() function of NumPy module checks each element of a numpy array-like whether it is a real number. Real numbers include integers, rational numbers and irrational numbers. 25 Oct 2024
  14. 14 The less() function of NumPy module Given two NumPy array-likes the less() function returns the result of element1 < element2, where element1, element2 are drawn from the two input array-likes in sequential order. 10 Nov 2024
  15. 15 NumPy logical_and() function The logical_and() function applies logical AND operation between the elements of the two numpy array-likes or scalars or a combination of them and returns the results. 14 Oct 2024
  16. 16 NumPy logical_or function Given two NumPy array-like objects, the function numpy.logical_or() applies the OR operation(i.e, results in True if both inputs are True else results in False) between their elements. 17 Oct 2024