class_docstr: Encode categorical features as an integer array.
  
  The input to this transformer should be an :py:class:`dask_cudf.DataFrame` or a
  :py:class:`dask.array.Array` backed by cupy, denoting the unique values taken on by
  categorical (discrete) features. The features are converted to ordinal
  integers. This results in a single column of integers (0 to n_categories - 1) per
  feature.
  
  Parameters
  ----------
  categories : :py:class:`cupy.ndarray` or :py:class`cudf.DataFrameq, default='auto'
      Categories (unique values) per feature. All categories are expected to
      fit on one GPU.
      - 'auto' : Determine categories automatically from the training data.
      - DataFrame/ndarray : ``categories[col]`` holds the categories expected
        in the feature col.
  handle_unknown : {'error', 'ignore'}, default='error'
      Whether to raise an error or ignore if an unknown categorical feature is
      present during transform (default is to raise). When this parameter is set
      to 'ignore' and an unknown category is encountered during transform, the
      resulting encoded value would be null when output type is cudf
      dataframe.
  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.
class_docstr_tok: ["Encode","categorical","features","as","an","integer","array",".","The","input","to","this","transformer","should","be","an",":","py",":","class",":","`","dask_cudf.DataFrame","`","or","a",":","py",":","class",":","`","dask.array.Array","`","backed","by","cupy",",","denoting","the","unique","values","taken","on","by","categorical","(","discrete",")","features",".","The","features","are","converted","to","ordinal","integers",".","This","results","in","a","single","column","of","integers","(","0","to","n_categories","-","1",")","per","feature",".","Parameters","--","--","--","--","--","categories",":",":","py",":","class",":","`","cupy.ndarray","`","or",":","py",":","class","`","cudf.DataFrameq",",","default='auto'","Categories","(","unique","values",")","per","feature",".","All","categories","are","expected","to","fit","on","one","GPU",".","-","'auto","'",":","Determine","categories","automatically","from","the","training","data",".","-","DataFrame\/ndarray",":","``","categories","[","col","]","``","holds","the","categories","expected","in","the","feature","col.","handle_unknown",":","{","'error","'",",","'ignore","'","}",",","default='error'","Whether","to","raise","an","error","or","ignore","if","an","unknown","categorical","feature","is","present","during","transform","(","default","is","to","raise",")",".","When","this","parameter","is","set","to","'ignore","'","and","an","unknown","category","is","encountered","during","transform",",","the","resulting","encoded","value","would","be","null","when","output","type","is","cudf","dataframe",".","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","."]
docstr: Fit Ordinal to X.
  
  Parameters
  ----------
  X : :py:class:`dask_cudf.DataFrame` or a CuPy backed :py:class:`dask.array.Array`.
      shape = (n_samples, n_features) The data to determine the categories of each
      feature.
  
  Returns
  -------
  self
docstr_tok: ["Fit","Ordinal","to","X.","Parameters","--","--","--","--","--","X",":",":","py",":","class",":","`","dask_cudf.DataFrame","`","or","a","CuPy","backed",":","py",":","class",":","`","dask.array.Array","`",".","shape","=","(","n_samples",",","n_features",")","The","data","to","determine","the","categories","of","each","feature",".","Returns","--","--","--","-","self"]
code: def fit(self, X):
      """Fit Ordinal to X.
  
      Parameters
      ----------
      X : :py:class:`dask_cudf.DataFrame` or a CuPy backed :py:class:`dask.array.Array`.
          shape = (n_samples, n_features) The data to determine the categories of each
          feature.
  
      Returns
      -------
      self
      """
      from cuml.preprocessing.ordinalencoder_mg import OrdinalEncoderMG
  
      el = first(X) if isinstance(X, Sequence) else X
      self.datatype = (
          "cudf"
          if isinstance(el, (dcDataFrame, daskSeries))
          else "cupy"
      )
  
      self._set_internal_model(OrdinalEncoderMG(**self.kwargs).fit(X))
  
      return self
  
imports: from collections.abc import Sequence
  from cuml.common import with_cupy_rmm
  from cuml.dask.common.base import BaseEstimator, DelayedInverseTransformMixin, DelayedTransformMixin
  from cuml.internals.safe_imports import gpu_only_import_from, gpu_only_import
  from dask_cudf.core import Series
  from toolz import first
label_desc: Use image node_id 1 for calling the OrdinalEncoder obj's underlying member method code with example usage: obj.fit(X) and returns: self