May-17-2020, 07:02 PM
(This post was last modified: May-17-2020, 07:02 PM by deanhystad.)
You need to modify the logic. Right now you only save max (or make a copy) if interval coincides with K[ijk] > P[ijk]. You should split the two up.
if (K[i][j][k]>P[0][j][k]: P[0][j][k]=K[i][j][k] if i % interval == 0: at_intervals.append(copy(P))This will give you a copy at 0, 10, 20. If you want 9, 19, 29 the test is if (i+1) % interval == 0