Sort the rows of matrix Z by the values in its n-th column. Return the sorted matrix.
Z
n
Input
Z = [[3 7 1] [1 2 9] [2 5 5]] n = 1
Output
[[1 2 9] [2 5 5] [3 7 1]]
This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.
solve(...)