code: def nanprod(
      a,
      /,
      *,
      axis=None,
      dtype=None,
      out=None,
      keepdims=False,
      initial=None,
      where=None,
  ):
      fill_values = ivy.ones_like(a)
      a = ivy.where(ivy.isnan(a), fill_values, a)
      if ivy.is_array(where):
          a = ivy.where(
              where, a, ivy.default(out, fill_values), out=out
          )
      if initial is not None:
          a[axis] = 1
          s = ivy.shape(a, as_array=False)
          header = ivy.full(s, initial)
          a = ivy.concat([header, a], axis=axis)
      return ivy.prod(
          a, axis=axis, dtype=dtype, keepdims=keepdims, out=out
      )
  
file_path: ivy/ivy/functional/frontends/numpy/mathematical_functions/sums_products_differences.py
imports: import ivy
  from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out
  import ivy.functional.frontends.numpy
label_desc: Use image node_id 7 for calling a global function with example usage: nanprod() and returns: ivy