Skip to content

Commit 7c52085

Browse files
batist73pzhokhov
authored andcommitted
Fix converting list of LazyFrames to ndarray (#907)
1 parent 1c872ca commit 7c52085

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

baselines/common/atari_wrappers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,13 @@ def __len__(self):
254254
return len(self._force())
255255

256256
def __getitem__(self, i):
257+
return self._force()[i]
258+
259+
def count(self):
260+
frames = self._force()
261+
return frames.shape[frames.ndim - 1]
262+
263+
def frame(self, i):
257264
return self._force()[..., i]
258265

259266
def make_atari(env_id, max_episode_steps=None):

0 commit comments

Comments
 (0)