Contact: aviboots(AT)netvision.net.il
37,083 questions
48,461 answers
573 users
import numpy as np array2D = np.array([[3, 1, 2, 0], [9, 7, 8, 4], [6, 5, 4, 3]]) # Sort each row sorted_array = np.sort(array2D, axis=1) print(sorted_array) ''' run: [[0 1 2 3] [4 7 8 9] [3 4 5 6]] '''