Get minimum of SortedKeyList with a condition on an object attribute
Get minimum of SortedKeyList with a condition on an object attribute Question: I have a SortedKeyList of objects sorted by timestamp, the objects also have another attribute, the ID. I was trying to get the earliest element of the list based on the ID. This is a code example: import numpy as np import sortedcontainers …