def _as_float_array(x, check_finite=False):
 x = np.ascontiguousarray(x)
 if (not np.issubdtype(x.dtype, np.inexact)):
  x = x.astype(float)
 if (check_finite and (not np.isfinite(x).all())):
  raise ValueError('Array must not contain infs or nans.')
 return x

def _as_float_array ( x , check_finite = False ) : x = np . ascontiguousarray ( x ) if ( not np . issubdtype ( x . dtype , np . inexact ) ) : x = x . astype ( float ) if ( check_finite and ( not np . isfinite ( x ) . all ( ) ) ) : raise ValueError ( 'Array must not contain infs or nans.' ) return x
convert the input into a c contiguous float array .