Create a function to reverse an array of integers.
Implement reverse_array(nums) so it reverses nums in place and returns the same list. The input is a list of integers, and the output is the reversed list. Do not use Python's built-in reverse() method or slicing to perform the reversal.
def reverse_array(nums):