6497c9f1c6e43066c8945f02ed3ed4d234f45dc1,gym/spaces/multi_binary.py,MultiBinary,__init__,#MultiBinary#Any#,5
Before Change
class MultiBinary(gym.Space):
def __init__(self, n):
self.n = n
gym.Space.__init__(self, (self.n,), np.int8)
def sample(self):
return gym.spaces.np_random.randint(low=0, high=2, size=self.n).astype(self.dtype)
After Change
def __init__(self, n):
self.n = n
super().__init__((self.n,), np.int8)
self.np_random = np.random.RandomState()
def seed(self, seed):
self.np_random.seed(seed)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: openai/gym
Commit Name: 6497c9f1c6e43066c8945f02ed3ed4d234f45dc1
Time: 2019-01-30
Author: zuoxingdong@users.noreply.github.com
File Name: gym/spaces/multi_binary.py
Class Name: MultiBinary
Method Name: __init__
Project Name: openai/gym
Commit Name: 6497c9f1c6e43066c8945f02ed3ed4d234f45dc1
Time: 2019-01-30
Author: zuoxingdong@users.noreply.github.com
File Name: gym/spaces/discrete.py
Class Name: Discrete
Method Name: __init__
Project Name: openai/gym
Commit Name: 6497c9f1c6e43066c8945f02ed3ed4d234f45dc1
Time: 2019-01-30
Author: zuoxingdong@users.noreply.github.com
File Name: gym/spaces/multi_discrete.py
Class Name: MultiDiscrete
Method Name: __init__