The above code would sort arr by first converting the elements to strings (which is not what you want). Also the sort is done in-place so it replaces the original value of arr with the sorted version. Review the sort documentation for how to sort numbers properly.
You will also find you have at least one other issue with your code once you fix the above issue. One is your use of:
arr is a one-dimensional array, so you could reference arr[i] to get a particular number in arr, but arr[i] attempts to get the first element in a sub array of arr, but arr does not have any sub arrays. It only has numbers as elements.