fix circular import (py2) by not importing spaces (#858)

This commit is contained in:
John Schulman
2018-02-02 23:01:45 -08:00
committed by GitHub
parent 21cc13a625
commit c21f09fb28
6 changed files with 22 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
from gym import Space
import gym
class Tuple(Space):
class Tuple(gym.Space):
"""
A tuple (i.e., product) of simpler spaces
@@ -9,7 +9,7 @@ class Tuple(Space):
"""
def __init__(self, spaces):
self.spaces = spaces
Space.__init__(self, None, None)
gym.Space.__init__(self, None, None)
def sample(self):
return tuple([space.sample() for space in self.spaces])