Max value of an array

Hello everyone,

I am using Netgen to solve NS equations and at some point I am doing a time loop and in each time step keeping variables in an array. I have two questions, first, how can I save 2 variables in two columns of an array?? I want to save the time instant t in one column and the drag coefficient at that time instant at second column. Second question is that how can I find the max value of drag cofficient and the time it occured?

right now I am saving the time and drag coefficient seperately as…

drag_list = []
time_list = []

[code]while(t < tfinal):


But i do not know how to find the max value of drag_list nor the instant it occured. Anyone knows how to solve this?

Thanks in advance


maxdrag, maxtime = drag_list[index], time_list[index]