code: def asarray_chkfinite(a, dtype=None, order=None):
      a = ivy.asarray(a, dtype=dtype)
      if not ivy.all(ivy.isfinite(a)):
          raise ValueError("array must not contain infs or NaNs")
      return a
  
file_path: ivy/ivy/functional/frontends/numpy/manipulation_routines/changing_array_shape.py
imports: import ivy
  from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back
label_desc: Use image node_id 2 for calling a global function with example usage: asarray_chkfinite(a, dtype, order) and returns: a