Skip to content

Commit

Permalink
sort tree label
Browse files Browse the repository at this point in the history
  • Loading branch information
colganwi committed Aug 21, 2024
1 parent 5998540 commit e349315
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/treedata/_core/aligned_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _validate_tree(self, tree: nx.DiGraph, key: str) -> nx.DiGraph:
def _update_tree_labels(self):
if self.parent._tree_label is not None:
if self.parent.allow_overlap:
mapping = {k: ",".join(map(str, v)) for k, v in self._leaf_to_tree.items()}
mapping = {k: ",".join(map(str, sorted(v))) for k, v in self._leaf_to_tree.items()}
else:
mapping = {k: next(iter(v)) for k, v in self._leaf_to_tree.items()}
getattr(self.parent, self.dim)[self.parent._tree_label] = getattr(self.parent, f"{self.dim}_names").map(
Expand Down

0 comments on commit e349315

Please sign in to comment.