diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index d09c007..53b222c 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -3,7 +3,6 @@ Changelog ========== - Release 2.2.0a0 (WIP) -------------------------- @@ -21,6 +20,7 @@ New Features: Bug Fixes: ^^^^^^^^^^ +- Prevents OOB error on Windows if no seed is passed (@PatrickHelm) Deprecations: ^^^^^^^^^^^^^ @@ -1444,4 +1444,4 @@ And all the contributors: @Melanol @qgallouedec @francescoluciano @jlp-ue @burakdmb @timothe-chaumont @honglu2875 @anand-bala @hughperkins @sidney-tio @AlexPasqua @dominicgkerr @Akhilez @Rocamonde @tobirohrer @ZikangXiong @DavyMorgan @luizapozzobon @Bonifatius94 @theSquaredError @harveybellini @DavyMorgan @FieteO @jonasreiher @npit @WeberSamuel @troiganto -@lutogniew @lbergmann1 @lukashass @BertrandDecoster @pseudo-rnd-thoughts @stefanbschneider @kyle-he +@lutogniew @lbergmann1 @lukashass @BertrandDecoster @pseudo-rnd-thoughts @stefanbschneider @kyle-he @PatrickHelm diff --git a/stable_baselines3/common/vec_env/base_vec_env.py b/stable_baselines3/common/vec_env/base_vec_env.py index a3ed989..16518a1 100644 --- a/stable_baselines3/common/vec_env/base_vec_env.py +++ b/stable_baselines3/common/vec_env/base_vec_env.py @@ -278,7 +278,7 @@ class VecEnv(ABC): if seed is None: # To ensure that subprocesses have different seeds, # we still populate the seed variable when no argument is passed - seed = np.random.randint(0, 2**32 - 1) + seed = int(np.random.randint(0, np.iinfo(np.uint32).max, dtype=np.uint32)) self._seeds = [seed + idx for idx in range(self.num_envs)] return self._seeds