First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
The problem is that max(zip(*volts))
returns a tuple, e.g. (1.0404236316680908,)
and not a float, so the if-statement doesn't work.
Use max(volts[0])
instead.
A tip is to print the values to check if they have the expected format when the code is not working correctly.