rm unnecessary __contains__ duplicate code (#1147)

`contains` really should not exist when it does exactly what the builtin
magic method `__contains__` was meant for, but that would break backward
compatibility.
This commit is contained in:
Alok Singh
2018-08-28 10:51:28 -07:00
committed by pzhokhov
parent 750063055f
commit 6332d4f113
7 changed files with 3 additions and 13 deletions

View File

@@ -38,8 +38,6 @@ class Box(gym.Space):
def contains(self, x):
return x.shape == self.shape and (x >= self.low).all() and (x <= self.high).all()
__contains__ = contains
def to_jsonable(self, sample_n):
return np.array(sample_n).tolist()
def from_jsonable(self, sample_n):