Mar
16

sort 2d array in python

There are many ways to sort a 2d arrays.

In general, you can use the sorted(), np.array.sort(),…

But you should also understand

  • what is meaning of list1.sort(list2)
  • ravel() vs. flatten()
  • what return the  key function back in sorted()
  • what will be returned by np.lexsort(), np.argsort()

Written by connygy. Posted in python

Trackback from your site.

Leave a comment