Conditions | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Author: Simon Blanke |
||
25 | def sort_for_best(sort, sort_by): |
||
26 | # Returns two lists sorted by the second |
||
27 | sort = np.array(sort) |
||
28 | sort_by = np.array(sort_by) |
||
29 | |||
30 | index_best = list(sort_by.argsort()[::-1]) |
||
31 | |||
32 | sort_sorted = sort[index_best] |
||
33 | sort_by_sorted = sort_by[index_best] |
||
34 | |||
35 | return sort_sorted, sort_by_sorted |
||
36 |