code: def _as_float_array(x, check_finite=False):
      """Convert the input into a C contiguous float array.
  
      NB: Upcasts half- and single-precision floats to double precision.
      """
      x = np.ascontiguousarray(x)
      dtyp = _get_dtype(x.dtype)
      x = x.astype(dtyp, copy=False)
      if check_finite and not np.isfinite(x).all():
          raise ValueError("Array must not contain infs or nans.")
      return x
  
imports: import operator
  import numpy
  from numpy.core.multiarray import normalize_axis_index
  from scipy.linalg import get_lapack_funcs, LinAlgError, cholesky_banded, cho_solve_banded, solve, solve_banded
  from .None import _bspl
  from .None import _fitpack_impl
  from .None import _fitpack
  from scipy._lib._util import prod
label_desc: Use image node_id 2 for calling a global function with example usage: _as_float_array(x, check_finite) and returns: x