for ii in range (0,70):
for jj in range (0,70):
f_max = 0
for k in range (0,50):
if np.abs(np.max(f_5.all())) > f_max:
f_max = f_5 #(+/-)
idx=k
Here f_5
shape is (70,70,50)
and it has maximum values around 360 and minimum values around 230. I want to save the max value and that points index in k
. But the f_max
is not updating.
如果我对它的理解正确,那么您正在寻找它而无需循环:
或等效地: