Update vector space utility functions for all spaces (#223)

This commit is contained in:
Mark Towers
2023-02-22 15:05:58 +00:00
committed by GitHub
parent 761bb2e033
commit a7d9146b1d
8 changed files with 293 additions and 408 deletions

View File

@@ -112,9 +112,10 @@ TESTING_COMPOSITE_SPACES_IDS = [f"{space}" for space in TESTING_COMPOSITE_SPACES
TESTING_SPACES: List[Space] = TESTING_FUNDAMENTAL_SPACES + TESTING_COMPOSITE_SPACES
TESTING_SPACES_IDS = TESTING_FUNDAMENTAL_SPACES_IDS + TESTING_COMPOSITE_SPACES_IDS
CUSTOM_SPACES = [
Space(),
Tuple([Space(), Space(), Space()]),
Dict(a=Space(), b=Space()),
]
CUSTOM_SPACES_IDS = [f"{space}" for space in CUSTOM_SPACES]
class CustomSpace(Space):
def __eq__(self, o: object) -> bool:
return isinstance(o, CustomSpace)
TESTING_CUSTOM_SPACE = CustomSpace()