I have a 2D Numpy array representing a level map in a tile-based game I'm making in Python3.7. My array is 50 rows x 50 columns, and each value is an integer number representing a sprite type (various wall parts, floors, etc). When I iterate through the array and find a wall sprite (for example), I want to know the row and column number of that value so I can reference it directly.
It seems such a simple thing, but I can't seem to find the right Numpy function that will iterate through the 2D array and return the position[row, col]of each one it finds. I can then calculate it's relative position on the screen using the array position, and then test collision with .colliderect().
EDIT: For more clarity, I'm adding the fact that I need to compare each integer value in the array to aList of wall parts (also integers), and if it's in the list, return the array position.
TL;DR How do I iterate through a Numpy 2darray and return the[row, col] for each match instead of the value?