Skip to main content

NumPy Where Function


In this tutorial you will learn:

  • What is array search?
  • NumPy where() function
  • Python Syntax

Array Search

Array search is carried out to check whether a specific element (alphabet / word / number) exist in an array or not. Generally all the searching algorithms return index of the number being searched and procedure involves iterating through each element of the array. There are two methods in NumPy for searching the array

  • NumPy where() function
  • NumPy searchsorted() function

NumPy where() function

NumPy where() function is a built in function of NumPy array and

Add new comment