Skip to content

Commit

Permalink
fix missing variable and add explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
ramcdougal authored Mar 23, 2024
1 parent 8588952 commit 96c7470
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/python/simctrl/savstate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ SaveState
h.continuerun(5 * ms)
# this function is here solely for the demo to show the staet has changed
# there's no need to do this in your code
def get_state():
return (
soma(0.5).v,
Expand All @@ -71,6 +73,10 @@ SaveState
h.continuerun(10 * ms)
# store the current state (don't need to do this in general, this is just to show
# that we're no longer here after the restore)
s2 = get_state()
# go back to the way things were at 5 * ms (when we called s.save())
s.restore()
Expand Down

0 comments on commit 96c7470

Please sign in to comment.