Closed tkmmark closed 4 years ago
as far as i can tell the code is correct. it is not the number of edges in the form diagram that matters in this context but rather the number of edges in the force diagram, and this is number can be counted correctly with self.number_of_edges()
.
the is_true
flag is used correctly in the uv_index
function to enumerate the true edges of the form diagram.
can you give an example of where this doesn't work as expected?
can i close this?
ForceDiagram.ordered_edges() ignores FormDiagram's edges' 'is_true' attributes
Suggest changing edges = [index_uv[index] for index in range(self.number_of_edges())] to n_form_true_edges = len(list(form.edges_where({'is_edge': True}))) edges = [index_uv[index] for index in range(n_form_true_edges)]