class_docstr: Constructs a transformer from an arbitrary callable.
  
  A FunctionTransformer forwards its X (and optionally y) arguments to a
  user-defined function or function object and returns the result of this
  function. This is useful for stateless transformations such as taking the
  log of frequencies, doing custom scaling, etc.
  
  Note: If a lambda is used as the function, then the resulting
  transformer will not be pickleable.
  
  Parameters
  ----------
  func : callable, default=None
      The callable to use for the transformation. This will be passed
      the same arguments as transform, with args and kwargs forwarded.
      If func is None, then func will be the identity function.
  
  inverse_func : callable, default=None
      The callable to use for the inverse transformation. This will be
      passed the same arguments as inverse transform, with args and
      kwargs forwarded. If inverse_func is None, then inverse_func
      will be the identity function.
  
  accept_sparse : bool, default=False
      Indicate that func accepts a sparse matrix as input. Otherwise,
      if accept_sparse is false, sparse matrix inputs will cause
      an exception to be raised.
  
  check_inverse : bool, default=True
     Whether to check that or ``func`` followed by ``inverse_func`` leads to
     the original inputs. It can be used for a sanity check, raising a
     warning when the condition is not fulfilled.
  
  kw_args : dict, default=None
      Dictionary of additional keyword arguments to pass to func.
  
  inv_kw_args : dict, default=None
      Dictionary of additional keyword arguments to pass to inverse_func.
  
  Examples
  --------
  >>> import cupy as cp
  >>> from cuml.preprocessing import FunctionTransformer
  >>> transformer = FunctionTransformer(cp.log1p)
  >>> X = cp.array([[0, 1], [2, 3]])
  >>> transformer.transform(X)
  array([[0.       , 0.6931...],
         [1.0986..., 1.3862...]])
class_docstr_tok: ["Constructs","a","transformer","from","an","arbitrary","callable",".","A","FunctionTransformer","forwards","its","X","(","and","optionally","y",")","arguments","to","a","user-defined","function","or","function","object","and","returns","the","result","of","this","function",".","This","is","useful","for","stateless","transformations","such","as","taking","the","log","of","frequencies",",","doing","custom","scaling",",","etc",".","Note",":","If","a","lambda","is","used","as","the","function",",","then","the","resulting","transformer","will","not","be","pickleable",".","Parameters","--","--","--","--","--","func",":","callable",",","default=None","The","callable","to","use","for","the","transformation",".","This","will","be","passed","the","same","arguments","as","transform",",","with","args","and","kwargs","forwarded",".","If","func","is","None",",","then","func","will","be","the","identity","function",".","inverse_func",":","callable",",","default=None","The","callable","to","use","for","the","inverse","transformation",".","This","will","be","passed","the","same","arguments","as","inverse","transform",",","with","args","and","kwargs","forwarded",".","If","inverse_func","is","None",",","then","inverse_func","will","be","the","identity","function",".","accept_sparse",":","bool",",","default=False","Indicate","that","func","accepts","a","sparse","matrix","as","input",".","Otherwise",",","if","accept_sparse","is","false",",","sparse","matrix","inputs","will","cause","an","exception","to","be","raised",".","check_inverse",":","bool",",","default=True","Whether","to","check","that","or","``","func","``","followed","by","``","inverse_func","``","leads","to","the","original","inputs",".","It","can","be","used","for","a","sanity","check",",","raising","a","warning","when","the","condition","is","not","fulfilled",".","kw_args",":","dict",",","default=None","Dictionary","of","additional","keyword","arguments","to","pass","to","func",".","inv_kw_args",":","dict",",","default=None","Dictionary","of","additional","keyword","arguments","to","pass","to","inverse_func",".","Examples","--","--","--","--",">",">",">","import","cupy","as","cp",">",">",">","from","cuml.preprocessing","import","FunctionTransformer",">",">",">","transformer","=","FunctionTransformer","(","cp.log1p",")",">",">",">","X","=","cp.array","(","[","[","0",",","1","]",",","[","2",",","3","]","]",")",">",">",">","transformer.transform","(","X",")","array","(","[","[","0.",",","0.6931","...","]",",","[","1.0986","...",",","1.3862","...","]","]",")"]
code: def _check_input(self, X):
      return self._validate_data(X, accept_sparse=self.accept_sparse)
  
file_path: cuml/python/cuml/_thirdparty/sklearn/preprocessing/_function_transformer.py
imports: import warnings
  import cuml
  from ....internals.array_sparse import SparseCumlArray
  from ..utils.skl_dependencies import TransformerMixin, BaseEstimator
  from ..utils.validation import _allclose_dense_sparse
  from ....internals import _deprecate_pos_args
label_desc: Use image node_id 2 for calling the FunctionTransformer obj's underlying member method code with example usage: obj._check_input(X) and returns: self