Skip to content

Commit

Permalink
Patch from talmolab#71 - Loading file with multiple skeletons destroy…
Browse files Browse the repository at this point in the history
…s node name list
  • Loading branch information
SkepticRaven committed Dec 21, 2023
1 parent 32c28f1 commit 1ae6e61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sleap_io/io/slp.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ def read_skeletons(labels_path: str) -> list[Skeleton]:

# Re-index correctly.
skeleton_node_inds = [node["id"] for node in skel["nodes"]]
node_names = [node_names[i] for i in skeleton_node_inds]
sorted_node_names = [node_names[i] for i in skeleton_node_inds]

# Create nodes.
nodes = []
for name in node_names:
for name in sorted_node_names:
nodes.append(Node(name=name))

# Create edges.
Expand Down

0 comments on commit 1ae6e61

Please sign in to comment.