I am trying to index 2D array "matrix" in these two functions. The indexing works well in the "findMin" function, but for the "plotContours" function, I keep getting the following error: "TypeError: 'numpy.float64' object is not callable"
What is the best way to pass a 2D array to a function that also contains integers in the arguments? The 2D array "matrix" is the same variable that I send to both functions.
Here are the two functions:
def findMin(matrix):
for i in range(len(matrix)):
for j in range(len(matrix[0])):...
[array index processing]
return xyz
def plotContours(matrix, max, min, range):
for i in range(len(matrix)):
for j in range(len(matrix[0])):...
[array index processing]
return xyz
max,minandrangeare predefined functions in Python, you cannot use them as variables.minandmaxare builtins), but this question is a textbook example of why.