-
Notifications
You must be signed in to change notification settings - Fork 0
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
Connection PyNEST class #2
Comments
@stinebuu Thanks for the detailed description! Given that we typically have a large number of connections, we need to keep compactness of representation in mind. The current representation is quite wasteful (one array per connection), and a representation with one dict per connection would be worse, even though it is more informative. I think that the most efficient solution would be a NumPy array with named columns and one row per connection. For connections, we do not have composite properties, i.e., properties that are containers. Therefore, for the sake of compactness of representation (and efficiency), I would suggest that |
The numbers in the (array of) arrays returned by We could even make the return type of |
At the VC on 1st of December, it was decided that
The
|
I have made a separate branch where the |
Remove old versions of scripts and small cleanup
cleanup of compute_compressed_secondary_recv_buffer_positions
I am closing this issue as the |
Now that we are going to deprecate
GetStatus
andSetStatus
, and instead useget
andset
, we need to make aConnections
PyNEST class, which you get when callingnest.GetConnections()
. Then, if we implementget
andset
in the class, we can still get and set info on connections, just as we now do withGetStatus
andSetStatus
.The class shouldn't be to difficult to implement, when we call
GetConnections()
we receive aConnectionDatum
, and then we can use this just as we use it in theGIDCollection
,Mask
andParameter
classes.The class should at least have:
len(..)
print(..)
set()
get()
I don't use
GetConnections
that often, so please add functionalities if something is missing, or remove if something is not needed.Right now, we return a tuple with arrays on the Python level when calling
GetConnections()
, where each array is of the form:Is this how it should be when we for instance print the
Connections
as well? It is compact and nice, but you have to go and look at the documentation to know what the different elements represents.How
GetConnections
works now:GetConnection
can take in sources, targets, synapse_model, synapse_label.Suggestion to how
Connections
will look:We can work with the
Connections
class almost exactly as the return value ofGetConnections
is now, that is, a tuple of arrays. Then we will have something likeWe could probably also make it so that we get a list of dictionaries:
The first is simpler, but the second is maybe more informative? Though, it would make it more complicated to extract information to use in your code. There is also a lot of overhead, and if we have many connections, which is often the case, this might be troublesome. We could make a dictionary with lists?
get
andset
I guess
set()
should work just asSetStatus()
. The question is whatget
should return. It could return the data the wayGetStatus()
now returns data:But it is maybe more intuitive to follow the output from
GIDCollection
'sget()
, and get a dictionary with lists. The question then is whether we should have something similar to theGID
list you get withGIDCollection
'sget()
. We could returnsource_gid
andtarget_GID
.Following the discussion in #1, we could also return lists or nested lists/tuples. So, something like
I don't really know what an empty
get()
call should return. I personally find it really useful to callGetStatus
without any parameters to know what I can set, what I can know, default values of the model etc., and think we should be able to do the same withget()
.Questions:
get()
andget(param)
should return?The text was updated successfully, but these errors were encountered: