For some backstory I am writing a program that involves a grid of squares that can all be of various colors, I decided that I would store the colors in a NumPy array (i have basically no experience with NumPy). I formated the array so that it was a 2d array and each position in it correlated to the position of the grid space. I need to check the current color so I did what I would do if it was just a list (for context array is the name of the array):
color = 0, 0, 0
array = numpy.array([(color,color,color,color),
(color,color,color,color),
(color,color,color,color)])
if array[0,0] == color:
#other code that doesn't matter
The if statement is where the error occurs and I can't find anything about what to do when this error comes up in an if statement only with and/or. If anybody has some insight into this problem any help would be greatly appreciated