NumPy · Lesson 3.1 · Pro

Sorting and top k

Sort values, sort one array by another, and pick the top k items, a classic interview task.

In this lesson

  1. Sort values
  2. Positions with argsort
  3. Sort one array by another
  4. Sorting each row