Skip to content

Commit 3d18aeb

Browse files
authored
Update passive_env_checker.py to fix "bool8 error"
fix the bool8 error bool8 -> bool **I have tested the change and made sure it runs well**
1 parent dcd1858 commit 3d18aeb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gym/utils/passive_env_checker.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -222,19 +222,19 @@ def env_step_passive_checker(env, action):
222222
)
223223
obs, reward, done, info = result
224224

225-
if not isinstance(done, (bool, np.bool8)):
225+
if not isinstance(done, (bool, np.bool)):
226226
logger.warn(
227227
f"Expects `done` signal to be a boolean, actual type: {type(done)}"
228228
)
229229
elif len(result) == 5:
230230
obs, reward, terminated, truncated, info = result
231231

232-
# np.bool is actual python bool not np boolean type, therefore bool_ or bool8
233-
if not isinstance(terminated, (bool, np.bool8)):
232+
# np.bool is actual python bool not np boolean type, therefore bool_ or bool
233+
if not isinstance(terminated, (bool, np.bool)):
234234
logger.warn(
235235
f"Expects `terminated` signal to be a boolean, actual type: {type(terminated)}"
236236
)
237-
if not isinstance(truncated, (bool, np.bool8)):
237+
if not isinstance(truncated, (bool, np.bool)):
238238
logger.warn(
239239
f"Expects `truncated` signal to be a boolean, actual type: {type(truncated)}"
240240
)

0 commit comments

Comments
 (0)