Write a Python function that takes an integer n and n numbers and returns an array containing the largest n numbers.
3, 8, 5, 7, 2, 10
def largest_n_numbers(n, *nums):
    nums_sorted = sorted(nums, reverse=True)
    return nums_sorted[:n]

result = largest_n_numbers(3, 8, 5, 7, 2, 10)
print(result)