code: def ediff1d(ary, to_end=None, to_begin=None):
      diffs = ivy.diff(ary)
      if to_begin is not None:
          if not isinstance(to_begin, (list, tuple)):
              to_begin = [to_begin]
          to_begin = ivy.array(to_begin)
          diffs = ivy.concat((to_begin, diffs))
      if to_end is not None:
          if not isinstance(to_end, (list, tuple)):
              to_end = [to_end]
          to_end = ivy.array(to_end)
          diffs = ivy.concat((diffs, to_end))
      return diffs
  
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 4 for calling a global function with example usage: ediff1d(ary, to_end, to_begin) and returns: diffs