code: def as_float_array(X, copy=True, force_all_finite=True):
      """Converts an array-like to an array of floats
  
      The new dtype will be np.float32 or np.float64, depending on the original
      type. The function can create a copy or modify the argument depending
      on the argument copy.
  
      Parameters
      ----------
      X : {array-like, sparse matrix}
  
      copy : bool, optional
          If True, a copy of X will be created. If False, a copy may still be
          returned if X's dtype is not a floating point type.
  
      force_all_finite : boolean (default=True)
          Whether to raise an error on np.inf and np.nan in X.
  
      Returns
      -------
      XT : {array, sparse matrix}
          An array of type np.float
      """
      if isinstance(X, np.matrix) or (
          not isinstance(X, np.ndarray) and not sp.issparse(X)
      ):
          return check_array(
              X,
              ["csr", "csc", "coo"],
              dtype=np.float64,
              copy=copy,
              force_all_finite=force_all_finite,
              ensure_2d=False,
          )
      elif sp.issparse(X) and X.dtype in [np.float32, np.float64]:
          return X.copy() if copy else X
      elif X.dtype in [np.float32, np.float64]:  # is numpy array
          return (
              X.copy("F" if X.flags["F_CONTIGUOUS"] else "C")
              if copy
              else X
          )
      else:
          return X.astype(
              np.float32 if X.dtype == np.int32 else np.float64
          )
  
imports: import warnings
  import numbers
  import numpy
  import scipy.sparse
  from ..externals import six
  from ..utils.fixes import signature
  from .deprecation import deprecated
  from ..exceptions import DataConversionWarning
  from ..exceptions import NonBLASDotWarning
  from ..exceptions import NotFittedError
label_desc: Use image node_id 3 for calling a global function with example usage: as_float_array(X, copy, force_all_finite) and returns: check_array, unknown, unknown, X