mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-22 07:02:19 +00:00
redo black (#2272)
This commit is contained in:
@@ -22,7 +22,9 @@ class Discrete(Space):
|
||||
def contains(self, x):
|
||||
if isinstance(x, int):
|
||||
as_int = x
|
||||
elif isinstance(x, (np.generic, np.ndarray)) and (x.dtype.char in np.typecodes["AllInteger"] and x.shape == ()):
|
||||
elif isinstance(x, (np.generic, np.ndarray)) and (
|
||||
x.dtype.char in np.typecodes["AllInteger"] and x.shape == ()
|
||||
):
|
||||
as_int = int(x)
|
||||
else:
|
||||
return False
|
||||
|
Reference in New Issue
Block a user