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

Behavior of subclassing groups differs between net and cell. #338

Closed
michaeldeistler opened this issue Apr 12, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@michaeldeistler
Copy link
Contributor

If one subclasses groups of net then one needs to use the global index of the cell (i.e. in the entire network):

net = jx.Network([cell for _ in range(5)])
net.cell(3).add_to_group("exc")
net.exc.cell(3).set(...)

Contrary to that, for cell, one has to use the local index of the branch within the group:

cell = jx.Cell(Branch, [-1, 0, 0])
cell.branch(2).add_to_group("exc")
cell.exc.branch(0).set(...)
@michaeldeistler michaeldeistler added the bug Something isn't working label Apr 12, 2024
@jnsbck jnsbck mentioned this issue Oct 10, 2024
@michaeldeistler
Copy link
Contributor Author

I think this can be closed, right @jnsbck ?

@jnsbck
Copy link
Contributor

jnsbck commented Oct 23, 2024

Should have been addressed in #447, will add a test for this in #453

@jnsbck jnsbck closed this as completed Oct 23, 2024
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
Development

No branches or pull requests

2 participants