Posts Tagged ‘NumPy’

Sort one list by another list

Friday, April 11th, 2008

Here are a couple of ways of sorting one list by another list in Python. The first uses plain ol’ Python, and the others use NumPy.

In each case imagine we want to sort a list of peoples names by their ages. (more…)