Jul-25-2018, 02:04 PM
Ok, this trivial code will illustrate the point - you cant watch the changes to the array unless it shows a stable print on the screen, and even if you adjust the window height manually to show just 4 lines, ultimately the loop crashes (exceeds max shell limit ?). Consequently I was looking for some code to either clear the shell display or alternatively to overwrite the previous loop cycle.
import numpy as np myarray = np.zeros([4,10]) print(myarray) while True: for i in range(4): myarray[i,0] = 1 + myarray[i,0] print(myarray)