mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-29 17:45:07 +00:00
spaces equality fixes and tests (#1375)
* spaces equality fixes and tests * squash-merged master * added better equality tests and more checks against bad space creation
This commit is contained in:
@@ -34,4 +34,4 @@ class Discrete(Space):
|
||||
return "Discrete(%d)" % self.n
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.n == other.n
|
||||
return isinstance(other, Discrete) and self.n == other.n
|
||||
|
Reference in New Issue
Block a user