Skip to content

Commit

Permalink
Fix pre-commit failed checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mwydmuch committed Dec 30, 2023
1 parent 499b5e5 commit ca59dba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/python/learning_stable_baselines3.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
from argparse import ArgumentParser

import cv2
import gymnasium
import numpy as np
from stable_baselines3 import PPO
from stable_baselines3.common.env_util import make_vec_env

import gymnasium
import vizdoom.gymnasium_wrapper # noqa


Expand Down Expand Up @@ -59,7 +59,9 @@ def __init__(self, env, shape=IMAGE_SHAPE):
print(env.observation_space)
num_channels = env.observation_space["screen"].shape[-1]
new_shape = (shape[0], shape[1], num_channels)
self.observation_space = gymnasium.spaces.Box(0, 255, shape=new_shape, dtype=np.uint8)
self.observation_space = gymnasium.spaces.Box(
0, 255, shape=new_shape, dtype=np.uint8
)

def observation(self, observation):
observation = cv2.resize(observation["screen"], self.image_shape_reverse)
Expand Down

0 comments on commit ca59dba

Please sign in to comment.