From 6e3f9265f25ec35f05f58d54c92d41ede7e127dc Mon Sep 17 00:00:00 2001 From: Sarah Walling-Bell Date: Fri, 30 Jan 2026 15:15:29 -0800 Subject: [PATCH] edit: sort irreducible morph nodes --- morph_utils/modifications.py | 1 + 1 file changed, 1 insertion(+) diff --git a/morph_utils/modifications.py b/morph_utils/modifications.py index 91a561b..1c17c9d 100644 --- a/morph_utils/modifications.py +++ b/morph_utils/modifications.py @@ -372,6 +372,7 @@ def generate_irreducible_morph(morph): next_node_up['type'] = 1 irreducible_nodes_with_topology.append(next_node_up) + irreducible_nodes_with_topology.sort(key=lambda n: n['id']) morph_irreducible = Morphology(irreducible_nodes_with_topology, parent_id_cb=lambda x: x['parent'], node_id_cb=lambda x: x['id'])