Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missing variable and add explanations #2797

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 state 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