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

Iter_connection on edges for subset of nodes crashes #271

Open
arnaudon opened this issue Sep 24, 2024 · 1 comment
Open

Iter_connection on edges for subset of nodes crashes #271

arnaudon opened this issue Sep 24, 2024 · 1 comment

Comments

@arnaudon
Copy link

arnaudon commented Sep 24, 2024

If I call edges.iter_connections(ids) where ids is in a single population of a multi-population circuit, this for loop

yield from pop.iter_connections(

crashes here:

https://github.com/BlueBrain/snap/blob/master/bluepysnap/nodes/node_population.py#L342

as it tries to get the connections in another population first.

I just wondered if it would be possible to have a smarter iter_connection to not crash, but return all connections, regardless to which populations the source/target cells belong to.

@eleftherioszisis
Copy link

eleftherioszisis commented Sep 26, 2024

Given that you pass ids e.g. [0, 1, 2, 3, 4, 5] to the function and there are multiple edge populations with node populations starting from 0 and with different sizes, I am not sure what the expected result should be.

Should it return all the connections from every edge pop that has node ids within that range, skipping out-of-size ids if any?

That doesn't sound practical for any analysis whatsoever. On the contrary, a behavior like this could be quite dangerous as it will return values where intuition would expect an error.

I would use the population level iter_connections at all times. I am not sure what is the purpose of iter_connections at the edge storage level when we have multiple edge populations with node populations of different sizes.

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

No branches or pull requests

2 participants