class_docstr: Discretize Box space.
class_docstr_tok: ["Discretize","Box","space","."]
docstr: Convert a continuous value to a discrete number.
docstr_tok: ["Convert","a","continuous","value","to","a","discrete","number","."]
code: def _get_index(self, value, minv, maxv, res):
      """Convert a continuous value to a discrete number."""
      if value >= maxv:
          return res - 1
      elif value <= minv:
          return 0
      else:
          ind = np.floor((value - minv) * res / (maxv - minv))
          return int(min(res - 1, max(0, ind)))
  
imports: import numpy
label_desc: Use image node_id 3 for calling the BoxSpaceDiscretizer obj's underlying member method code with example usage: obj._get_index(value, minv, maxv, res) and returns: unknown, int, int