Skip to content

Commit

Permalink
Add Dict helper methods (openai#2417)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan138 authored Sep 22, 2021
1 parent d35d211 commit ae01834
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gym/spaces/dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,12 @@ def from_jsonable(self, sample_n):

def __eq__(self, other):
return isinstance(other, Dict) and self.spaces == other.spaces

def keys(self):
return self.spaces.keys()

def values(self):
return self.spaces.values()

def items(self):
return self.spaces.items()

0 comments on commit ae01834

Please sign in to comment.