Skip to content

Commit f3116bf

Browse files
committed
Remove list comprehension form find_next_active_node
1 parent a4ccdb2 commit f3116bf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ciw/simulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ def find_next_active_node(self):
172172
Returns the next active node:
173173
"""
174174
next_event_date = min([nd.next_event_date for nd in self.nodes])
175-
next_active_node_indices = [i for i, x in enumerate([
176-
nd.next_event_date for nd in self.nodes]) if x == next_event_date]
175+
next_active_node_indices = [i for i, nd in enumerate(
176+
self.nodes) if nd.next_event_date == next_event_date]
177177
if len(next_active_node_indices) > 1:
178178
return self.nodes[random_choice(next_active_node_indices)]
179179
return self.nodes[next_active_node_indices[0]]

0 commit comments

Comments
 (0)