Skip to content

Commit

Permalink
use tuple format for Node
Browse files Browse the repository at this point in the history
  • Loading branch information
eberrigan committed Sep 17, 2024
1 parent f0451c5 commit b4f10af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sleap/skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ def to_json(self, node_to_idx: Optional[Dict[Node, int]] = None) -> str:
{
"id": {
"py/object": "sleap.skeleton.Node",
"py/state": {"name": node.name, "weight": node.weight},
"py/state": {"py/tuple": [node.name, node.weight]},
}
}
for node in self.nodes
Expand All @@ -1118,7 +1118,7 @@ def to_json(self, node_to_idx: Optional[Dict[Node, int]] = None) -> str:
{
"id": {
"py/object": "sleap.skeleton.Node",
"py/state": {"name": node.name, "weight": node.weight},
"py/state": {"py/tuple": [node.name, node.weight]},
}
}
for node in self.nodes
Expand Down

0 comments on commit b4f10af

Please sign in to comment.