My mistake. The JSON dict is unordered* and I forgot to sort the records before calculating.
I'll release a fix in a couple of minutes.
* Actually, it is ordered, but the book ids are treated as strings, so instead of (1, 2, 3, ..., 9, 10, 11, 12, ..., 19, 20, 21), you get (1, 10, 11, 12, ..., 19, 2, 20, 21, 3, 4 ..., 9). So we need to reorder it treating the keys as integers.
Last edited by thiago.eec; 05-25-2024 at 06:27 AM.
|