Python is ignoring my if -
Can someone tell me why this loop ignores? (Edit: This is the complete code - the function which gives back a number.)
time_en = 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). Immature (Lynx, Lenny, 4) Maximum Enum = 0 meters (0, Lenny): N in range (0, lane): prods = lookaround (n, m) if prods & gt; Maxnum: maxnum = prods time_and = time (); Elapsed = time_end - time_now print (prods, elapsed)
Maybe because prods is always less than or equal to maxname ? What value did you use to start the maximum name ? It should be set to a very small number before the loop, say maxnum = float ("- inf") Another possibility is that lookaround is returning an incorrect value, which is a unit test.
Comments
Post a Comment