Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
howardh committed Jan 8, 2025
1 parent d410f04 commit 702b21d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
16 changes: 1 addition & 15 deletions gymnasium/wrappers/vector/vectorize_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,6 @@ def __init__(
"""
super().__init__(env)

"""
self._single_observation_space_error = None
self._single_observation_space = self.env.single_observation_space
if observation_space is None:
if single_observation_space is not None:
self.observation_space = batch_space(single_observation_space, self.num_envs)
else:
self.observation_space = observation_space
if single_observation_space is None:
# TODO: We could compute this from the observation_space.
self._single_observation_space_error = "`single_observation_space` not defined. A new observation space was provided to the TransformObservation wrapper, but not the single observation space."
else:
self._single_observation_space = single_observation_space
"""
self._single_action_space_error = None
self._single_action_space = self.env.single_action_space
if action_space is None:
Expand All @@ -108,7 +94,7 @@ def actions(self, actions: ActType) -> ActType:

@property
def single_action_space(self) -> Space:
"""The single observation space of the environment."""
"""The single action space of the environment."""
if self._single_action_space_error is not None:
raise AttributeError(self._single_action_space_error)
return self._single_action_space
Expand Down
2 changes: 1 addition & 1 deletion tests/wrappers/vector/test_transform_action.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Test suite for vector TransformObservation wrapper."""
"""Test suite for vector TransformAction wrapper."""

import numpy as np

Expand Down

0 comments on commit 702b21d

Please sign in to comment.