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

@@ -243,7 +243,7 @@ def _flatten_sequence(
space: Sequence, x: tuple[Any, ...] | Any
) -> tuple[Any, ...] | Any:
if space.stack:
samples_iters = gym.vector.utils.iterate(space.batched_feature_space, x)
samples_iters = gym.vector.utils.iterate(space.stacked_feature_space, x)
flattened_samples = [
flatten(space.feature_space, sample) for sample in samples_iters
]