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

`(summed)` flag does not work correctly for pre-synaptic variables #704

mstimberg opened this Issue Jun 1, 2016 · 0 comments


None yet
1 participant

mstimberg commented Jun 1, 2016

In principle, our syntax also allows the (summed) flag for pre-synaptic variables. This should set this variable for each pre-synaptic neuron to the sum of the expression on the right-hand-side, evaluated for all the synapses originating from the respective neuron. However, it seems we (meaning: I :-( ) have hard-coded the indexing over post-synaptic variables into the templates. This means this will most likely do something completely wrong...

The easiest way to see this is when connecting two groups of differing size. The following will raise an error with the numpy target and abort/segfault in weave/cython:

G1 = NeuronGroup(1, 'syn_sum : 1')
G2 = NeuronGroup(10, '')

synapses = Synapses(G1, G2, '''syn_var : 1
                               syn_sum_pre = syn_var : 1 (summed)''')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment