class_docstr: Transformer that maps dataframes to numpy arrays of floats.
  
  It is in essence a wrapper around sklearn transformers (meta-transformer)
  that automatically infers the type of data, or makes sure the transformer
  encodes it as floating point numbers. It applies one-hot-encoding
  to categorical columns, and 'passthrough' (nothing) to
  numerical columns. The usefulness of this class is that it can
  preprocess different kinds of data (discrete, continuous) to one
  standard format while also remembering what kind of data was inputted.
  An estimator using this preprocessor can use
  this classes' :code:`dist_type_` attribute to know what kind of data
  was originally inputted.
  
  Attributes
  ----------
  in_type_ : Object
      the type of the input data. Should be either a list, DataFrame,
      ndarray, or Series.
  dist_type_ : str
      A string that in dicates the distribution type of the original data.
      It is one of :code:`"binary"`, :code:`"category"`,
      or :code:`"continuous"`
class_docstr_tok: ["Transformer","that","maps","dataframes","to","numpy","arrays","of","floats",".","It","is","in","essence","a","wrapper","around","sklearn","transformers","(","meta-transformer",")","that","automatically","infers","the","type","of","data",",","or","makes","sure","the","transformer","encodes","it","as","floating","point","numbers",".","It","applies","one-hot-encoding","to","categorical","columns",",","and","'passthrough","'","(","nothing",")","to","numerical","columns",".","The","usefulness","of","this","class","is","that","it","can","preprocess","different","kinds","of","data","(","discrete",",","continuous",")","to","one","standard","format","while","also","remembering","what","kind","of","data","was","inputted",".","An","estimator","using","this","preprocessor","can","use","this","classes","'",":","code",":","`","dist_type_","`","attribute","to","know","what","kind","of","data","was","originally","inputted",".","Attributes","--","--","--","--","--","in_type_",":","Object","the","type","of","the","input","data",".","Should","be","either","a","list",",","DataFrame",",","ndarray",",","or","Series",".","dist_type_",":","str","A","string","that","in","dicates","the","distribution","type","of","the","original","data",".","It","is","one","of",":","code",":","`","``","binary","''","`",",",":","code",":","`","``","category","''","`",",","or",":","code",":","`","``","continuous","''","`"]
docstr: Check X and convert to 2d ndarray.
  
  dtype : numpy.dtype
      None to keep dtypes, float to coerce to numeric.
  
  init : bool
      Whether this is the first call to _check or not. Useful to store
      the dimensions of X, so we can use this for inverse_transform
  
  Returns
  -------
  X : numpy.ndarray
      validated input
docstr_tok: ["Check","X","and","convert","to","2d","ndarray",".","dtype",":","numpy.dtype","None","to","keep","dtypes",",","float","to","coerce","to","numeric",".","init",":","bool","Whether","this","is","the","first","call","to","_check","or","not",".","Useful","to","store","the","dimensions","of","X",",","so","we","can","use","this","for","inverse_transform","Returns","--","--","--","-","X",":","numpy.ndarray","validated","input"]
code: def _check(self, X, dtype=None, init=False):
      """
      Check X and convert to 2d ndarray.
  
      dtype : numpy.dtype
          None to keep dtypes, float to coerce to numeric.
  
      init : bool
          Whether this is the first call to _check or not. Useful to store
          the dimensions of X, so we can use this for inverse_transform
  
      Returns
      -------
      X : numpy.ndarray
          validated input
      """
      X = check_array(
          X,
          accept_sparse=False,
          accept_large_sparse=False,
          dtype=dtype,
          ensure_2d=False,
      )
      if init:
          self.input_dim_ = X.ndim
      else:
          if X.ndim != self.input_dim_:
              raise ValueError(
                  "Dimension of data is inconsistent with previous call"
              )
      if X.ndim == 1:
          X = X.reshape(-1, 1)
  
      return X
  
file_path: fairlearn/fairlearn/adversarial/_preprocessor.py
imports: import fairlearn.utils._compatibility
  from ._constants import _TYPE_COMPLIANCE_ERROR, _TYPE_CHECK_ERROR, _ARG_ERROR_MESSAGE, _TYPE_UNKNOWN_ERROR, _INVALID_OHE
  from sklearn.utils import check_array
  from sklearn.preprocessing import OneHotEncoder
  from pandas import Series, DataFrame
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.utils.multiclass import type_of_target
  from numpy import all
  from numpy import sum
  from numpy import unique, isin
label_desc: Use image node_id 2 for calling the FloatTransformer obj's underlying member method code with example usage: obj._check(X, dtype, init) and returns: X