Conditions | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Author: Simon Blanke |
||
18 | def sort_for_best(sort, sort_by): |
||
19 | # Returns two lists sorted by the second |
||
20 | sort = np.array(sort) |
||
21 | sort_by = np.array(sort_by) |
||
22 | |||
23 | index_best = list(sort_by.argsort()[::-1]) |
||
24 | |||
25 | sort_sorted = sort[index_best] |
||
26 | sort_by_sorted = sort_by[index_best] |
||
27 | |||
28 | return sort_sorted, sort_by_sorted |
||
29 |