Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #759

Merged
merged 10 commits into from
Oct 30, 2024
Prev Previous commit
Next Next commit
fix graph?
Arina Danilina committed Oct 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 27a77f4d1defed73c33848f817c8bdaeabeeeef6
4 changes: 3 additions & 1 deletion src/moscot/datasets.py
Original file line number Diff line number Diff line change
@@ -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()