Yes, given an array, array, and a value, item to search for, you can use np.where as:

itemindex = numpy.where(array == item)

The result is a tuple with first all the row indices, then all the column indices.

For example, if an array is two dimensions and it contained your item at two locations then

array[itemindex[0][0]][itemindex[1][0]]

would be equal to your item and so would be:

array[itemindex[0][1]][itemindex[1][1]]
Answer from Alex on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-find-the-index-of-value-in-numpy-array
How to find the Index of value in Numpy Array ? - GeeksforGeeks
July 23, 2025 - where() method is used to specify the index of a particular element specified in the condition. ... Here, we find all the indexes of 3 and the index of the first occurrence of 3, we get an array as output and it shows all the indexes where 3 ...
Discussions

python - Index of element in NumPy array - Stack Overflow
This problem can be solved efficiently using the numpy_indexed library (disclaimer: I am its author); which was created to address problems of this type. npi.indices can be viewed as an n-dimensional generalisation of list.index. More on stackoverflow.com
🌐 stackoverflow.com
Find indices of a list of values in a numpy array - Stack Overflow
I have a numpy master array. Given another array of search values, with repeating elements, I want to produce the indices of these search values in the master array. E.g.: master array is [1,2,3,... More on stackoverflow.com
🌐 stackoverflow.com
Find the index of the minimum value in a list?
You could try a.index(min(a)) More on reddit.com
🌐 r/learnpython
12
2
June 18, 2015
efficiently finding the index of a value in a numpy array
You can use np.where(OPs_array==value) to get the indices. But if that is the main use of your array then consider using a dictionary. More on reddit.com
🌐 r/learnpython
1
3
September 9, 2022
🌐
Reddit
reddit.com › r/learnpython › efficiently finding the index of a value in a numpy array
r/learnpython on Reddit: efficiently finding the index of a value in a numpy array
September 9, 2022 -

I have a numpy array that has unique values and is static, and I routinely want to find some index of a value. Is it a good idea to repeatedly use where for this? Is numpy sorting the values and storing a mapping of them to the indices behind the scene, or otherwise doing something smart to quickly find the index? If not, what would be a good way to implement finding the index of a value in a numpy array?

🌐
Delft Stack
delftstack.com › home › howto › python › python find index of value in array
How to Find the Index of an Element in a List in Python | Delft Stack
February 2, 2024 - Note that NumPy arrays are delimited by single whitespace instead of the normal commas. In summary, the index() function is the easiest way to find the position of an element within a Python list.
🌐
Sololearn
sololearn.com › en › Discuss › 3083966 › how-to-find-an-index-of-value-of-an-ndarray-inside-a-list
How to find an index of value of an ndarray inside a list? | Sololearn: Learn to code for FREE!
@python@python3@numpy · 15th Sep 2022, 12:41 AM · Rea Hi · 5 Answers · Answer · + 2 · Rea Hi , what result are you expecting when searching for 333? is it index 2? it looks like you are considering the input list as a flattened list like [111, 222, 333, 44445] . 15th Sep 2022, 10:56 AM · Lothar · + 1 · Hi! Your search services in browser is crashed? https://pythonguides.com/JUMP_LINK__&&__python__&&__JUMP_LINK-find-index-of-element-in-list/ https://www.geeksforgeeks.org/how-to-find-the-index-of-value-in-numpy-array/ https://pythonguides.com/python-numpy-indexing/ 15th Sep 2022, 5:47 AM ·
🌐
W3Schools
w3schools.com › python › numpy › numpy_array_search.asp
NumPy Searching Arrays
Which means that the value 4 is present at index 3, 5, and 6. ... import numpy as np arr = np.array([10, 14, 93, 41, 8, 7]) x = np.where(arr%2 == 1) print(x) Try it Yourself »
🌐
GeeksforGeeks
geeksforgeeks.org › python › find-index-of-element-in-array-in-python
Find index of element in array in python - GeeksforGeeks
July 23, 2025 - We often need to find the position or index of an element in an array (or list). We can use an index() method or a simple for loop to accomplish this task. index() method is the simplest way to find the index of an element in an array.
Find elsewhere
🌐
NumPy
numpy.org › doc › 2.2 › reference › generated › numpy.argwhere.html
numpy.argwhere — NumPy v2.2 Manual
Find the indices of array elements that are non-zero, grouped by element · Indices of elements that are non-zero. Indices are grouped by element. This array will have shape (N, a.ndim) where N is the number of non-zero items
🌐
NumPy
numpy.org › doc › stable › user › basics.indexing.html
Indexing on ndarrays — NumPy v2.5 Manual
As in Python, all indices are zero-based: for the i-th index \(n_i\), the valid range is \(0 \le n_i < d_i\) where \(d_i\) is the i-th element of the shape of the array. Negative indices are interpreted as counting from the end of the array (i.e., if \(n_i < 0\), it means \(n_i + d_i\)). All arrays generated by basic slicing are always views of the original array. ... NumPy slicing creates a view instead of a copy as in the case of built-in Python sequences such as string, tuple and list...
🌐
W3Schools
w3schools.com › python › numpy › numpy_array_indexing.asp
NumPy Array Indexing
Think of 2-D arrays like a table with rows and columns, where the dimension represents the row and the index represents the column. Access the element on the first row, second column: import numpy as np arr = np.array([[1,2,3,4,5], [6,7,8,9,10]]) print('2nd element on 1st row: ', arr[0, 1]) Try it Yourself »
🌐
NumPy
numpy.org › doc › 2.1 › reference › generated › numpy.indices.html
numpy.indices — NumPy v2.1 Manual
The indices can be used as an index into an array. >>> x = np.arange(20).reshape(5, 4) >>> row, col = np.indices((2, 3)) >>> x[row, col] array([[0, 1, 2], [4, 5, 6]]) Note that it would be more straightforward in the above example to extract the required elements directly with x[:2, :3].
🌐
Statology
statology.org › home › how to find index of value in numpy array (with examples)
How to Find Index of Value in NumPy Array (With Examples)
September 17, 2021 - This tutorial explains how to find the index location of specific values in a NumPy array, including examples.
🌐
FavTutor
favtutor.com › blogs › get-list-index-python
Get the Index of an Element in a List in Python | FavTutor
July 19, 2026 - In Python, you get the index of an element in a list with the index() method: my_list.index(value) returns the position of the first match.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-get-the-indices-of-all-occurrences-of-an-element-in-a-list
Get the indices of all occurrences of an element in a list - Python - GeeksforGeeks
July 23, 2025 - A manual approach involves using a loop to iterate through the list and collecting indices where the element matches. The loop iterates through each index in the list. If a match is found the index is added to indices.
🌐
Sololearn
sololearn.com › en › Discuss › 2579971 › how-i-get-the-index-of-element-in-numpy-array
how i get the index of element in numpy array?
November 7, 2020 - Sololearn is the world's largest community of people learning to code. With over 25 programming courses, choose from thousands of topics to learn how to code, brush up your programming knowledge, upskill your technical ability, or stay informed about the latest trends.
🌐
Python Guides
pythonguides.com › get-index-of-element-in-python-list
Find Element Positions Using Python List Index Method
December 29, 2025 - # Defining a Python list of US ... 0, and “Chicago” returns 2. One thing I learned early in my career is that the Python index() method is “fragile” if the element isn’t there....
🌐
datagy
datagy.io › home › python posts › python lists › python: find list index of all occurrences of an element
Python: Find List Index of All Occurrences of an Element • datagy
December 30, 2022 - You learned how to do this using the Python enumerate() function using both for loops and list comprehensions. You also learned how to use the numpy where() function to do and the more_itertools locate() function.
🌐
Delft Stack
delftstack.com › home › howto › numpy › index of element in array
How to Find the First Index of Element in NumPy Array | Delft Stack
March 11, 2025 - If you prefer working with Python lists, you can convert your NumPy array to a list and then use the built-in list.index() method to find the index of the first occurrence of an element.