class_docstr: Discrete Range
class_docstr_tok: ["Discrete","Range"]
docstr: Train discrete range
docstr_tok: ["Train","discrete","range"]
code: def train(
      self, x: AnyArrayLike, drop: bool = False, na_rm: bool = False
  ):
      """
      Train discrete range
      """
      rng = None if self.is_empty() else self.range
      self.range = scale_discrete.train(x, rng, drop, na_rm=na_rm)
  
file_path: plotnine/plotnine/scales/range.py
imports: from __future__ import annotations
  import typing
  from mizani.scale import scale_continuous, scale_discrete
label_desc: Use image node_id 1 for calling the RangeDiscrete obj's underlying member method code with example usage: obj.train(x, drop, na_rm) without return types