Skip to content

Commit

Permalink
fix graph?
Browse files Browse the repository at this point in the history
  • Loading branch information
Arina Danilina committed Oct 15, 2024
1 parent 98a8597 commit 27a77f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/moscot/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,9 @@ def _get_random_trees(
assert len(leaf_names[i]) == n_leaves
trees = []
for tree_idx in range(n_trees):
G = nx.random_labeled_tree(n_initial_nodes, seed=seed)
tempG = nx.random_labeled_tree(n_initial_nodes, seed=seed)
G = nx.DiGraph()
G.add_edges_from(tempG.edges)
leaves = [x for x in G.nodes() if G.out_degree(x) == 0 and G.in_degree(x) == 1]
inner_nodes = list(set(G.nodes()) - set(leaves))
leaves_updated = leaves.copy()
Expand Down

0 comments on commit 27a77f4

Please sign in to comment.