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

Bug in connectivity_matrix_connect #486

Closed
kyralianaka opened this issue Nov 7, 2024 · 1 comment · Fixed by #488 · May be fixed by #489
Closed

Bug in connectivity_matrix_connect #486

kyralianaka opened this issue Nov 7, 2024 · 1 comment · Fixed by #488 · May be fixed by #489
Assignees
Labels
bug Something isn't working

Comments

@kyralianaka
Copy link
Contributor

kyralianaka commented Nov 7, 2024

The following code does not work because of issues indexing into the precell indices when creating the rows for appending multiple synapses; it only works in the pre range starts at zero.

comp = jx.Compartment()
branch = jx.Branch(comp, nseg=1)
cell = jx.Cell([branch], parents=[-1])
net = jx.Network([cell for _ in range(10)])

pre = net.cell(list(range(2, 5)))
post = net.cell(list(range(5, 7)))
print(len(pre.nodes), len(post.nodes))

conn_mat = np.ones((len(pre.nodes), len(post.nodes))).astype(bool)
print(conn_mat)

connectivity_matrix_connect(pre, post, IonotropicSynapse(), conn_mat)

One gets an index error
image

NOTE: this worked about a month ago but not anymore

I don't think this was intended right @jnsbck?

@kyralianaka kyralianaka added the bug Something isn't working label Nov 7, 2024
@kyralianaka kyralianaka self-assigned this Nov 7, 2024
jnsbck added a commit that referenced this issue Nov 7, 2024
@jnsbck
Copy link
Contributor

jnsbck commented Nov 7, 2024

This is indeed a bug. Will take care of if asap. thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants