mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-21 06:20:15 +00:00
Merge main into array-api (#1401)
Co-authored-by: Martin Schuck <57562633+amacati@users.noreply.github.com> Co-authored-by: Kallinteris Andreas <30759571+Kallinteris-Andreas@users.noreply.github.com> Co-authored-by: James Mochizuki-Freeman <jameymmf@gmail.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
"""Testing utilitys for `gymnasium.vector`."""
|
||||
|
||||
import time
|
||||
from typing import Optional
|
||||
|
||||
import numpy as np
|
||||
|
||||
@@ -67,7 +66,7 @@ class SlowEnv(gym.Env):
|
||||
)
|
||||
self.action_space = Box(low=0.0, high=1.0, shape=(), dtype=np.float32)
|
||||
|
||||
def reset(self, *, seed: Optional[int] = None, options: Optional[dict] = None):
|
||||
def reset(self, *, seed: int | None = None, options: dict | None = None):
|
||||
"""Resets the environment with a time sleep."""
|
||||
super().reset(seed=seed)
|
||||
if self.slow_reset > 0:
|
||||
@@ -113,7 +112,7 @@ class CustomSpaceEnv(gym.Env):
|
||||
self.observation_space = CustomSpace()
|
||||
self.action_space = CustomSpace()
|
||||
|
||||
def reset(self, *, seed: Optional[int] = None, options: Optional[dict] = None):
|
||||
def reset(self, *, seed: int | None = None, options: dict | None = None):
|
||||
"""Resets the environment."""
|
||||
super().reset(seed=seed)
|
||||
return "reset", {}
|
||||
|
Reference in New Issue
Block a user