class_docstr: A multi-class dummy encoder for labels.
  
  Parameters
  ----------
  
  neg_label : integer (default=0)
      label to be used as the negative binary label
  pos_label : integer (default=1)
      label to be used as the positive binary label
  sparse_output : bool (default=False)
      whether to return sparse arrays for transformed output
  handle : cuml.Handle
      Specifies the cuml.handle that holds internal CUDA state for
      computations in this model. Most importantly, this specifies the CUDA
      stream that will be used for the model's computations, so users can
      run different models concurrently in different streams by creating
      handles in several streams.
      If it is None, a new one is created.
  verbose : int or boolean, default=False
      Sets logging level. It must be one of `cuml.common.logger.level_*`.
      See :ref:`verbosity-levels` for more info.
  output_type : {'input', 'array', 'dataframe', 'series', 'df_obj',         'numba', 'cupy', 'numpy', 'cudf', 'pandas'}, default=None
      Return results and set estimator attributes to the indicated output
      type. If None, the output type set at the module level
      (`cuml.global_settings.output_type`) will be used. See
      :ref:`output-data-type-configuration` for more info.
  
  Examples
  --------
  
  Create an array with labels and dummy encode them
  
  .. code-block:: python
  
      >>> import cupy as cp
      >>> import cupyx
      >>> from cuml.preprocessing import LabelBinarizer
  
      >>> labels = cp.asarray([0, 5, 10, 7, 2, 4, 1, 0, 0, 4, 3, 2, 1],
      ...                     dtype=cp.int32)
  
      >>> lb = LabelBinarizer()
      >>> encoded = lb.fit_transform(labels)
      >>> print(str(encoded))
      [[1 0 0 0 0 0 0 0]
      [0 0 0 0 0 1 0 0]
      [0 0 0 0 0 0 0 1]
      [0 0 0 0 0 0 1 0]
      [0 0 1 0 0 0 0 0]
      [0 0 0 0 1 0 0 0]
      [0 1 0 0 0 0 0 0]
      [1 0 0 0 0 0 0 0]
      [1 0 0 0 0 0 0 0]
      [0 0 0 0 1 0 0 0]
      [0 0 0 1 0 0 0 0]
      [0 0 1 0 0 0 0 0]
      [0 1 0 0 0 0 0 0]]
      >>> decoded = lb.inverse_transform(encoded)
      >>> print(str(decoded))
      [ 0  5 10  7  2  4  1  0  0  4  3  2  1]
docstr: Fit label binarizer and transform multi-class labels to their
  dummy-encoded representation.
  
  Parameters
  ----------
  y : array of shape [n_samples,] or [n_samples, n_classes]
  
  Returns
  -------
  
  arr : array with encoded labels
docstr_tok: ["Fit","label","binarizer","and","transform","multi-class","labels","to","their","dummy-encoded","representation",".","Parameters","--","--","--","--","--","y",":","array","of","shape","[","n_samples",",","]","or","[","n_samples",",","n_classes","]","Returns","--","--","--","-","arr",":","array","with","encoded","labels"]
code: def fit_transform(self, y) -> SparseCumlArray:
      """
      Fit label binarizer and transform multi-class labels to their
      dummy-encoded representation.
  
      Parameters
      ----------
      y : array of shape [n_samples,] or [n_samples, n_classes]
  
      Returns
      -------
  
      arr : array with encoded labels
      """
      return self.fit(y).transform(y)
  
file_path: cuml/python/cuml/preprocessing/label.py
imports: from cuml.prims.label import check_labels, invert_labels, make_monotonic
  from cuml.internals.array_sparse import SparseCumlArray
  from cuml.common.array_descriptor import CumlArrayDescriptor
  from cuml.common import CumlArray, has_scipy
  import cuml.internals
  from cuml import Base
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 3 for calling the LabelBinarizer obj's underlying member method code with example usage: obj.fit_transform(y) and returns: self