mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-07-31 05:44:31 +00:00
Use SupportsFloat in step_api_compatibility (#368)
Co-authored-by: Mark Towers <mark.m.towers@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""Contains methods for step compatibility, from old-to-new and new-to-old API."""
|
||||
from typing import Tuple, Union
|
||||
from typing import SupportsFloat, Tuple, Union
|
||||
|
||||
import numpy as np
|
||||
|
||||
@@ -8,14 +8,14 @@ from gymnasium.core import ObsType
|
||||
|
||||
DoneStepType = Tuple[
|
||||
Union[ObsType, np.ndarray],
|
||||
Union[float, np.ndarray],
|
||||
Union[SupportsFloat, np.ndarray],
|
||||
Union[bool, np.ndarray],
|
||||
Union[dict, list],
|
||||
]
|
||||
|
||||
TerminatedTruncatedStepType = Tuple[
|
||||
Union[ObsType, np.ndarray],
|
||||
Union[float, np.ndarray],
|
||||
Union[SupportsFloat, np.ndarray],
|
||||
Union[bool, np.ndarray],
|
||||
Union[bool, np.ndarray],
|
||||
Union[dict, list],
|
||||
|
Reference in New Issue
Block a user