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

Make sure node parameters can be iterables or Parameter when creating spatial nodes #2304

Merged
merged 2 commits into from
Mar 1, 2022

Conversation

stinebuu
Copy link
Contributor

This fixes #2251

@stinebuu stinebuu added T: Enhancement New functionality, model or documentation S: Normal Handle this with default priority I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Feb 22, 2022
@stinebuu stinebuu added this to In progress in PyNEST via automation Feb 22, 2022
@stinebuu stinebuu moved this from In progress to Review in PyNEST Feb 22, 2022
@med-ayssar
Copy link
Contributor

Thank you @stinebuu, it works pretty well. However, I would like addressing another issues regarding the positions parameter.
Once the positions are given to the create function, we will have the following NodeCollection instance: x = NodeCollection(metadata=spatial, model=iaf_psc_alpha, size=6, first=19, last=24), but calling y = ǹest.NodeCollection(x.tolist()) return another NodeCollection instance with the metatdata set to None, y = NodeCollection(metadata=None, model=iaf_psc_alpha, size=6, first=19, last=24), and I think that the instance y must also somehow have its metadata equal to the metadata of x, as they both point to the same collection.

@stinebuu
Copy link
Contributor Author

Thanks @med-ayssar. Could you create another issue about this? I do not think this should be solved in this PR as it is a separate issue. The problem is a bit more complex for this second issue, I am not sure there is an easy fix, we would need to look into it. The metadata needs to be set on Kernel level, and we would need to find a way to check if the node ids have metadata. It would be great if you could say a little about when you would need this in the issue as well. We are aware of the issue already, and would be happy to look into it if there is a real use case, but up to now there hasn't really been any use cases.

Copy link
Contributor

@hakonsbm hakonsbm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hakonsbm hakonsbm merged commit 9171758 into nest:master Mar 1, 2022
PyNEST automation moved this from Review to Done Mar 1, 2022
@stinebuu stinebuu deleted the params_and_positions branch March 1, 2022 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation
Projects
PyNEST
  
Done
Development

Successfully merging this pull request may close these issues.

Dependency between params and positions in nest.Create
3 participants