فهرست منبع

Use correct shape for one hot encoding (#93)

Anders Thuesen 5 سال پیش
والد
کامیت
050ce008c8
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      gym_minigrid/wrappers.py

+ 1 - 1
gym_minigrid/wrappers.py

@@ -135,7 +135,7 @@ class OneHotPartialObsWrapper(gym.core.ObservationWrapper):
 
     def observation(self, obs):
         img = obs['image']
-        out = np.zeros(self.observation_space.shape, dtype='uint8')
+        out = np.zeros(self.observation_space.spaces['image'].shape, dtype='uint8')
 
         for i in range(img.shape[0]):
             for j in range(img.shape[1]):