Xsort numpy5/18/2023 ![]() ![]() # sort the array with different algorithmsĪrr_sorted1 = np.sort(arr, kind='quicksort')Īrr_sorted2 = np.sort(arr, kind='mergesort')Īrr_sorted3 = np.sort(arr, kind='heapsort')Īrr_sorted4 = np.sort(arr, kind='stable') Let’s look at the result of using different sorting algorithms in the numpy.sort() function. It determines which fields to compare first.
0 Comments
Leave a Reply. |