input: Write a function to count the number of unique elements in an integer array.
  
  Write a function named `num_unique_elements` that takes an integer array `arr` as input and returns the number of unique elements in the array.
  
  assert num_unique_elements([1, 2, 3, 2, 1, 4, 7, 8, 9, 8])==7
output: def num_unique_elements(arr):
      return len(set(arr))