if obs is not None:
if len(obs.shape) == 2:
obs = obs[:, :, None]
if obs.shape[2] == 1:
obs = obs.repeat(3, axis=2)
display_arr(screen, obs, transpose=transpose, video_size=video_size)
// process pygame events
for event in pygame.event.get():
After Change
if callback is not None:
callback(prev_obs, obs, action, rew, env_done, info)
if obs is not None:
rendered=env.render( mode="rgb_array")
display_arr(screen, rendered, transpose=transpose, video_size=video_size)
// process pygame events
for event in pygame.event.get():