parent
07957b105d
commit
05e835684d
@ -120,7 +120,7 @@ class NeighborList(collections.abc.Sequence):
|
|||||||
item = min(items, key=lambda tpl: abs(self.fuzzyval - tpl[1]))
|
item = min(items, key=lambda tpl: abs(self.fuzzyval - tpl[1]))
|
||||||
else:
|
else:
|
||||||
sorted_items = sorted([(idx, e) for (idx, e) in
|
sorted_items = sorted([(idx, e) for (idx, e) in
|
||||||
enumerate(self.items)])
|
enumerate(self.items)], key=lambda e: e[1])
|
||||||
idx = 0 if offset < 0 else -1
|
idx = 0 if offset < 0 else -1
|
||||||
item = sorted_items[idx]
|
item = sorted_items[idx]
|
||||||
self._idx = item[0]
|
self._idx = item[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user