Maxime Chevalier-Boisvert 6 tahun lalu
induk
melakukan
6e77fbef44
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      gym_minigrid/rendering.py

+ 1 - 1
gym_minigrid/rendering.py

@@ -144,7 +144,7 @@ class Renderer:
         numBytes = self.width * self.height * 3
         buf = self.img.bits().asstring(numBytes)
         output = np.frombuffer(buf, dtype='uint8')
-        output = output.reshape((height, width, 3))
+        output = output.reshape((self.height, self.width, 3))
 
         return output