xxxxxxxxxx
import numpy as np, pygame as pg, sys
pg.init()
w, h = 640, 480
screen = pg.display.set_mode((w, h))
img = np.random.uniform(0, 255, (w, h, 3))
while 1:
for event in pg.event.get():
if event.type == pg.QUIT:
sys.exit()
pg.quit()
pg.surfarray.blit_array(screen, img0)
pg.display.update()