class_docstr: A space consisting of finitely many elements.
  
  This class represents a finite subset of integers, more specifically a set of the form :math:`\{ a, a+1, \dots, a+n-1 \}`.
  
  Example::
  
      >>> Discrete(2)            # {0, 1}
      >>> Discrete(3, start=-1)  # {-1, 0, 1}
class_docstr_tok: ["A","space","consisting","of","finitely","many","elements",".","This","class","represents","a","finite","subset","of","integers",",","more","specifically","a","set","of","the","form",":","math",":","`","\\","{","a",",","a+1",",","\\dots",",","a+n-1","\\","}","`",".","Example",":",":",">",">",">","Discrete","(","2",")","#","{","0",",","1","}",">",">",">","Discrete","(","3",",","start=-1",")","#","{","-1",",","0",",","1","}"]
docstr: Check whether ``other`` is equivalent to this instance.
docstr_tok: ["Check","whether","``","other","``","is","equivalent","to","this","instance","."]
code: def __eq__(self, other) -> bool:
      """Check whether ``other`` is equivalent to this instance."""
      return (
          isinstance(other, Discrete)
          and self.n == other.n
          and self.start == other.start
      )
  
file_path: gym/gym/spaces/discrete.py
imports: from typing import Optional, Union
  import numpy
  from gym.spaces.space import Space
label_desc: Use image node_id 6 for calling the Discrete obj's underlying member method code with example usage: obj.__eq__(other) and returns: unknown