-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
C++-corebugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Commonly I will have some code like the following:
# Setup
tn = tc.edge_lists()
tn = num_nodes
tn = list(range(num_timesteps))
tn = num_timesteps
# Add edges conditional on criterion
for t in range(0, num_timesteps):
edges_t = []
for i in range(num_nodes):
for j in range(i+1, num_nodes):
if some_criterion(i, j):
edges_t.append((i, j))
tn.edges.append(edges_t) # <-- `edges_t` DOESN'T ACTUALLY APPEND TO `tn.edges`As indicated by the last comment, appending to tn.edges like this does nothing so after the loop has run tn.edges == []. Also no error is raised. Instead, when trying to do edge_activity_plot(tn) I received ValueError: min() arg is an empty sequence
Easy to reproduce just set tn.edges = [] and call edge_activity_plot(tn). I recommend either raising an error when appending to tn.edges, or enabling appending to tn.edges somehow.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C++-corebugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request