input: Write a function that takes an integer array as input and returns the number of unique elements in the array. The function should utilize the Python set to remove duplicates and then return the length of this set. 
  
  def num_unique_elements(arr):
      unique_arr = set(arr)
      return len(unique_arr)
  
  assert num_unique_elements([1, 2, 3, 2, 1, 4, 7, 8, 9, 8])==7
  assert num_unique_elements([5, 5, 5, 5])==1
  assert num_unique_elements([1, 2, 3, 4])==4
  assert num_unique_elements([])==0
  assert num_unique_elements([-1, -2, -3, 0, -1])==4
output: def num_unique_elements(arr):
      unique_arr = set(arr)
      return len(unique_arr)