Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 54)
54.
Given a NumPy array arr = np.array([3, 1, 4, 1, 5, 9]), what does np.sort(arr) return?
[1, 1, 3, 4, 5, 9]
[9, 5, 4, 3, 1, 1]
[1, 3, 1, 4, 5, 9]
[1, 1, 4, 3, 5, 9]
Answer: Option
Explanation:
The np.sort() function returns a sorted version of the array.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.