Update dict.py

This commit is contained in:
Xingdong Zuo
2019-03-25 01:05:15 +01:00
committed by GitHub
parent f408e2284c
commit 8d3c4ad6cc

View File

@@ -36,7 +36,7 @@ class Dict(Space):
if spaces is None:
spaces = spaces_kwargs
for space in spaces.values():
assert isinstance(space, gym.Space), 'Values of the dict should be instances of gym.Space'
assert isinstance(space, Space), 'Values of the dict should be instances of gym.Space'
if isinstance(spaces, dict) and not isinstance(spaces, OrderedDict):
spaces = OrderedDict(sorted(list(spaces.items())))
if isinstance(spaces, list):