mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-16 11:39:13 +00:00
fix and complete docstrings to match the documentation page (#2697)
This commit is contained in:
@@ -11,23 +11,18 @@ class MultiBinary(Space[np.ndarray]):
|
||||
"""
|
||||
An n-shape binary space.
|
||||
|
||||
The argument to MultiBinary defines n, which could be a number or a `list` of numbers.
|
||||
The argument to MultiBinary defines n, which could be a number or a ``list`` of numbers.
|
||||
|
||||
Example Usage:
|
||||
Example Usage::
|
||||
|
||||
>> self.observation_space = spaces.MultiBinary(5)
|
||||
|
||||
>> self.observation_space.sample()
|
||||
|
||||
array([0, 1, 0, 1, 0], dtype=int8)
|
||||
|
||||
>> self.observation_space = spaces.MultiBinary([3, 2])
|
||||
|
||||
>> self.observation_space.sample()
|
||||
|
||||
array([[0, 0],
|
||||
[0, 1],
|
||||
[1, 1]], dtype=int8)
|
||||
>>> self.observation_space = spaces.MultiBinary(5)
|
||||
>>> self.observation_space.sample()
|
||||
array([0, 1, 0, 1, 0], dtype=int8)
|
||||
>>> self.observation_space = spaces.MultiBinary([3, 2])
|
||||
>>> self.observation_space.sample()
|
||||
array([[0, 0],
|
||||
[0, 1],
|
||||
[1, 1]], dtype=int8)
|
||||
|
||||
"""
|
||||
|
||||
|
Reference in New Issue
Block a user