Skip to content

Commit

Permalink
Merge pull request #174 from jfrancis71/master
Browse files Browse the repository at this point in the history
Fix for issue #173
  • Loading branch information
muupan authored Sep 21, 2022
2 parents d89ddf6 + f09e108 commit 2ad3d51
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pfrl/wrappers/atari_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import gym
import numpy as np
from gym import spaces
from packaging import version

import pfrl

Expand Down Expand Up @@ -37,9 +38,10 @@ def reset(self, **kwargs):
if self.override_num_noops is not None:
noops = self.override_num_noops
else:
noops = self.unwrapped.np_random.randint(
1, self.noop_max + 1
) # pylint: disable=E1101
if version.parse(gym.__version__) >= version.parse("0.24.0"):
noops = self.unwrapped.np_random.integers(1, self.noop_max + 1)
else:
noops = self.unwrapped.np_random.randint(1, self.noop_max + 1)
assert noops > 0
obs = None
for _ in range(noops):
Expand Down

0 comments on commit 2ad3d51

Please sign in to comment.