Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Allow simple saving/loading of synaptic variables via Synapses.save_connectivity/load_connectivity #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented May 19, 2014

Added optional argument synaptic_vars to Synapses.save_connectivity that may contain a list of strings of synaptic variables that are then saved to the file along with the synaptic indices. Variables saved in this way are automatically restored by load_connectivity.

@mstimberg
Copy link
Member

Hi Felix, thanks for your contribution!
I'll add some comments directly to the source code. Could you also add a test for your feature or rather adapt the existing test for the save functionality ( https://github.com/brian-team/brian/blob/master/brian/tests/testutils/test_savesynapses.py )? Actually, the existing test seems to assume that synaptic variables are saved already but it only passes because it compares the state variable in the Synapses object before saving to itself... Weird.
In general, it would be nice to have some more error checking in this function (non-existing variable names, etc) -- but let's leave this for the port to Brian 2 :)

Note that we don't really use github/git for the development in Brian1, I'll commit the changes to the subversion repository in the end and close this pull request. Therefore you don't have to bother with cleaning up the commit history or anything like that if you continue to make changes to this pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants