Generate an algorithm in Python that reverses the order of elements in an array.
def reverseArray(arr): 
    start = 0
    end = len(arr) - 1
    while start < end: 
        arr[start], arr[end] = arr[end], arr[start] 
        start += 1
        end -= 1
    return arr