Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit e5b1659

Browse files
committed
fix hamilton graph network example
1 parent 51f5990 commit e5b1659

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jraph/examples/hamiltonian_graph_network.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ def set_system_state(
199199
position: np.ndarray,
200200
momentum: np.ndarray) -> jraph.GraphsTuple:
201201
"""Sets the non-static parameters of the graph (momentum, position)."""
202-
nodes = static_graph.nodes.copy(position=position, momentum=momentum)
202+
nodes = static_graph.nodes.set("position", position)
203+
nodes = nodes.set("momentum", momentum)
203204
return static_graph._replace(nodes=nodes)
204205

205206

0 commit comments

Comments
 (0)