The above unutbu answer is very clear and concise. But, here is another way we can do that is more general and can be used for lists as well.
eval, evec = sp.eig(A) ev_list = zip( eval, evec ) ev_list.sort(key=lambda tup:tup[0], reverse=False) eval, evec = zip(*ev_list)
This tup [0] is an eigenvalue based on which sorting sorts the list.
reverse = False to increase the order.
ShikharDua Oct 12 '13 at 3:14 2013-10-12 03:14
source share