Commit 887b0edf authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

patch reordering to allow duplicate requests for now

parent 8321b1b2
......@@ -123,10 +123,12 @@ class Reorderer:
self.size = len(arr)
arr = list(enumerate(arr))
arr = group(arr, lambda x: fn(x[1]))
arr = [([y[0] for y in x], x[0][1]) for x in arr]
arr = [([y[0]], x[0][1]) for x in arr for y in x]
# arr = [([y[0] for y in x], x[0][1]) for x in arr]
arr.sort(key=lambda x: fn(x[1]))
self.arr = arr
[print(x) for x in arr[:3]]
def get_reordered(self):
return [x[1] for x in self.arr]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment