I have a numpy.array of data called f, I know the max value in it is f_max=max(f) but I would like to know the index in the array corresponding to the maximum value.
I tried:
count = 0
while (f[count]!=fmax)
conto ++
but I receive an error:
SyntaxError: invalid syntax
Could anyone help me?
:at the end of thewhilestatement, and usecount += 1, but the answer below is the right way to do it.numpytag based on the information below that you are using a numpy array. If this information is incorrect then please say so.