Sort following NumPy array
- Case 1: Sort array by the second row
- Case 2: Sort the array by the second column
Expected Output:
Printing Original array
[[34 43 73]
[82 22 12]
[53 94 66]]
Sorting Original array by second row
[[73 43 34]
[12 22 82]
[66 94 53]]
Sorting Original array by second column
[[82 22 12]
[34 43 73]
[53 94 66]]
Solution:
need an explanation for this answer? contact us directly to get an explanation for this answer