code: def _process_continuous(X_col, nonmissings):
      # called under: fit or predict
  
      if issubclass(X_col.dtype.type, np.floating):
          X_col = X_col.astype(dtype=np.float64, copy=False)
          return X_col, None
      elif (
          issubclass(X_col.dtype.type, np.integer)
          or X_col.dtype.type is np.bool_
      ):
          X_col = X_col.astype(dtype=np.float64)
          if nonmissings is not None:
              X_col_tmp = np.full(
                  len(nonmissings), np.nan, dtype=np.float64
              )
              np.place(X_col_tmp, nonmissings, X_col)
              X_col = X_col_tmp
  
          return X_col, None
      else:
          # we either have an np.object_ or np.unicode_/np.str_
          try:
              floats = X_col.astype(dtype=np.float64)
              bad = None
          except (TypeError, ValueError):
              # we get a TypeError whenever we have an np.object_ array and numpy attempts to call float(), but the
              # object doesn't have a __float__ function.  We get a ValueError when either a str object inside an
              # np.object_ array or when an np.unicode_ array attempts to convert a string to a float and fails
  
              n_samples = len(X_col)
              bad = np.full(n_samples, None, dtype=np.object_)
              floats = np.zeros(n_samples, dtype=np.float64)
              for idx in range(n_samples):
                  # slice one item at a time keeping as an np.ndarray
                  one_item_array = X_col[idx : idx + 1]
                  try:
                      # use .astype(..) instead of float(..) to ensure identical conversion results
                      floats[idx] = one_item_array.astype(
                          dtype=np.float64
                      )[0]
                  except TypeError:
                      # use .astype instead of str(one_item_array) here to ensure identical string categories
                      one_str_array = one_item_array.astype(
                          dtype=np.unicode_
                      )
                      try:
                          # use .astype(..) instead of float(..) to ensure identical conversion results
                          floats[idx] = one_str_array.astype(
                              dtype=np.float64
                          )[0]
                      except ValueError:
                          bad.itemset(idx, one_str_array.item())
                  except ValueError:
                      bad.itemset(idx, one_item_array.item())
  
              # bad.any() would fail to work if bad was allowed to be either None or False, but None
              # values in X_col should always be identified as missing by our caller, and False should be successfully
              # converted to 0.0 above, so neither should end up in the bad array other than non-bad indicators
              bad = bad if bad.any() else None
  
          if nonmissings is not None:
              floats_tmp = np.full(
                  len(nonmissings), np.nan, dtype=np.float64
              )
              np.place(floats_tmp, nonmissings, floats)
              floats = floats_tmp
  
              if bad is not None:
                  bad_tmp = np.full(
                      len(nonmissings), None, dtype=np.object_
                  )
                  np.place(bad_tmp, nonmissings, bad)
                  bad = bad_tmp
  
          return floats, bad
  
imports: from collections import Counter
  from itertools import count
  import numpy
  import numpy.ma
  import logging
label_desc: Use image node_id 6 for calling a global function with example usage: _process_continuous(X_col, nonmissings) and returns: X_col,  None, X_col,  None, floats,  bad