Open
Description
For SynapseCollection
we have two ways of getting the source and target node ids: conns.source
and conns.sources()
in the snippet below
E = nest.Create('aeif_cond_exp',2)
I = nest.Create('aeif_cond_exp',2)
nest.Connect(E,I)
conns = nest.GetConnections()
s = conns.source # returns a list of node ids
s_iter = conns.sources() # returns an iterator, iterating over node ids
Both return node id's, but as we are using NodeCollection
everywhere now, we should think about changing conns.sources()
and conns.targets()
to instead be iterators returning the source and target NodeCollection
s. As sources and targets most often are not unique, we cannot return a NodeCollection
iterator directly, but we can create our own iterator that converts the node id to a NodeCollection
and returns it.
This first came up in this mailing list question.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To do