We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46ccbae commit 3bad905Copy full SHA for 3bad905
torchrl/envs/gym_like.py
@@ -231,7 +231,11 @@ def read_action(self, action):
231
Returns: an action in a format compatible with the contained environment.
232
233
"""
234
- return self.action_spec.to_numpy(action, safe=False)
+ action_spec = self.full_action_spec
235
+ action_keys = self.action_keys
236
+ if len(action_keys) == 1:
237
+ action_spec = action_spec[action_keys[0]]
238
+ return action_spec.to_numpy(action, safe=False)
239
240
def read_done(
241
self,
0 commit comments