Skip to content

Commit

Permalink
remove extra wrapping of multi_discrete space shape into a tuple (ope…
Browse files Browse the repository at this point in the history
  • Loading branch information
pzhokhov authored Nov 6, 2018
1 parent 520fd3a commit 6410593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gym/spaces/multi_discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def __init__(self, nvec):
nvec: vector of counts of each categorical variable
"""
self.nvec = np.asarray(nvec, dtype=np.int32)
gym.Space.__init__(self, (self.nvec.shape,), np.int8)
gym.Space.__init__(self, self.nvec.shape, np.int8)

def sample(self):
return (gym.spaces.np_random.random_sample(self.nvec.shape) * self.nvec).astype(self.dtype)
Expand Down

0 comments on commit 6410593

Please sign in to comment.