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 = cupy.asarray(x)
      x = cupy.ascontiguousarray(x)
      dtyp = _get_dtype(x.dtype)
      x = x.astype(dtyp, copy=False)
      if check_finite and not cupy.isfinite(x).all():
          raise ValueError("Array must not contain infs or nans.")
      return x
  
file_path: cupy/cupyx/scipy/interpolate/_bspline2.py
imports: import operator
  from numpy.core.multiarray import normalize_axis_index
  import cupy
  from cupyx.scipy import sparse
  from cupyx.scipy.sparse.linalg import spsolve
  from cupyx.scipy.interpolate._bspline import _get_module_func, INTERVAL_MODULE, D_BOOR_MODULE, BSpline
label_desc: Use image node_id 2 for calling a global function with example usage: _as_float_array(x, check_finite) and returns: x