Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
keyaloding committed Jul 9, 2024
1 parent a2205bf commit fcc13c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sleap_io/io/nwb.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ def slp_skeleton_to_nwb(skeleton: SLEAPSkeleton) -> NWBSkeleton: # type: ignore
An NWB skeleton.
"""
skeleton_edges = {i: node for i, node in enumerate(skeleton.nodes)}
nwb_edges = []
nwb_edges: list[list[int, int]] = []
for i, source in skeleton_edges.items():
for destination in skeleton_edges.values()[i:]:
for destination in list(skeleton_edges.values())[i:]:
if Edge(source, destination) in skeleton.edges:
nwb_edges.append([i, skeleton_edges.index(destination)])
nwb_edges.append([i, list(skeleton_edges.values()).index(destination)])

return NWBSkeleton(
name=f"Nodes {skeleton.nodes[0].name} - {skeleton.nodes[-1].name}",
Expand Down

0 comments on commit fcc13c6

Please sign in to comment.