谁能告诉我为什么这个循环忽略了if?(编辑:这是整个代码 - 返回一个数字的函数。)
time_now = time()
number = np.loadtxt("11.txt", unpack=True, dtype='int64')
lenx = len(number[0,:])
leny = len(number[:,0])
lennum = 4
#prods = np.zeros(lenx*leny*4).reshape(lenx,leny,4)
maxnum = 0
for m in range(0,leny):
for n in range(0,lenx):
prods = lookaround(n,m)
if prods > maxnum:
maxnum = prods
time_end = time();
elapsed = time_end - time_now
print(prods, elapsed)