Skip to content

Commit

Permalink
source and target should be tuples in edge dict
Browse files Browse the repository at this point in the history
  • Loading branch information
eberrigan committed Sep 13, 2024
1 parent 71b0307 commit 69db671
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sleap/skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,13 +1052,12 @@ def to_json(self, node_to_idx: Optional[Dict[Node, int]] = None) -> str:
"key": 0, # Always 0.
"source": {
"py/object": "sleap.skeleton.Node",
"py/state": {"name": source.name, "weight": 1.0},
"py/state": {"py/tuple": [source.name, source.weight]},
},
"target": {
"py/object": "sleap.skeleton.Node",
"py/state": {"name": target.name, "weight": 1.0},
"py/state": {"py/tuple": [target.name, target.weight]},
},
# "target": {"py/id": node_to_id[target]},
"type": edge_type,
}
)
Expand Down

0 comments on commit 69db671

Please sign in to comment.