Conditions | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Author: Simon Blanke |
||
34 | def sort_for_best(sort, sort_by): |
||
35 | # Returns two lists sorted by the second |
||
36 | sort = np.array(sort) |
||
37 | sort_by = np.array(sort_by) |
||
38 | |||
39 | index_best = list(sort_by.argsort()[::-1]) |
||
40 | |||
41 | sort_sorted = sort[index_best] |
||
42 | sort_by_sorted = sort_by[index_best] |
||
43 | |||
44 | return sort_sorted, sort_by_sorted |
||
45 |