Given an array, write a program to sort it in ascending order. Implement a function that accepts a list of integers and returns the values ordered from smallest to largest. The input may be empty and can contain duplicate or negative values.
def sort_array(nums):