Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimised Display
#6
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)
Reply


Messages In This Thread
Optimised Display - by Astrikor - Jul-22-2018, 11:00 AM
RE: Optimised Display - by Larz60+ - Jul-22-2018, 01:01 PM
RE: Optimised Display - by Astrikor - Jul-23-2018, 08:10 PM
RE: Optimised Display - by Astrikor - Jul-24-2018, 08:28 PM
RE: Optimised Display - by Larz60+ - Jul-24-2018, 10:16 PM
RE: Optimised Display - by Astrikor - Jul-25-2018, 02:04 PM
RE: Optimised Display - by dageci - Jul-26-2018, 10:53 AM
RE: Optimised Display - by Astrikor - Jul-26-2018, 01:02 PM
RE: Optimised Display - by dageci - Jul-26-2018, 01:41 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020