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:
Mark Towers
2025-06-10 14:16:42 +01:00
committed by GitHub
parent 3ad2527f38
commit 3c17911700
116 changed files with 513 additions and 2802 deletions

View File

@@ -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", {}