mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-23 15:04:20 +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."""
|
"""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
|
import numpy as np
|
||||||
|
|
||||||
@@ -8,14 +8,14 @@ from gymnasium.core import ObsType
|
|||||||
|
|
||||||
DoneStepType = Tuple[
|
DoneStepType = Tuple[
|
||||||
Union[ObsType, np.ndarray],
|
Union[ObsType, np.ndarray],
|
||||||
Union[float, np.ndarray],
|
Union[SupportsFloat, np.ndarray],
|
||||||
Union[bool, np.ndarray],
|
Union[bool, np.ndarray],
|
||||||
Union[dict, list],
|
Union[dict, list],
|
||||||
]
|
]
|
||||||
|
|
||||||
TerminatedTruncatedStepType = Tuple[
|
TerminatedTruncatedStepType = Tuple[
|
||||||
Union[ObsType, np.ndarray],
|
Union[ObsType, np.ndarray],
|
||||||
Union[float, np.ndarray],
|
Union[SupportsFloat, np.ndarray],
|
||||||
Union[bool, np.ndarray],
|
Union[bool, np.ndarray],
|
||||||
Union[bool, np.ndarray],
|
Union[bool, np.ndarray],
|
||||||
Union[dict, list],
|
Union[dict, list],
|
||||||
|
Reference in New Issue
Block a user