mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-09-14 14:08:17 +00:00
Add Sequence
space, update flatten
functions (#2968)
* Added Sequence space, updated flatten functions to work with Sequence, Graph. WIP. * Small fixes, added Sequence space to tests * Replace Optional[Any] by Any * Added tests for flattening of non-numpy-flattenable spaces * Return all seeds
This commit is contained in:
@@ -139,6 +139,11 @@ class Box(Space[np.ndarray]):
|
||||
"""Has stricter type than gym.Space - never None."""
|
||||
return self._shape
|
||||
|
||||
@property
|
||||
def is_np_flattenable(self):
|
||||
"""Checks whether this space can be flattened to a :class:`spaces.Box`."""
|
||||
return True
|
||||
|
||||
def is_bounded(self, manner: str = "both") -> bool:
|
||||
"""Checks whether the box is bounded in some sense.
|
||||
|
||||
|
Reference in New Issue
Block a user