One2One#
- class brainpy.connect.One2One(*args, **kwargs)[source]#
Connect two neuron groups one by one. This means The two neuron groups should have the same size.
- build_coo()[source]#
Build a coo sparse connection data.
- Returns:
conn – A tuple denoting the
(pre_ids, post_ids)
.- Return type:
- build_csr()[source]#
Build a csr sparse connection data.
- Returns:
conn – A tuple denoting the
(indices, indptr)
.- Return type:
- build_mat()[source]#
Build a binary matrix connection data.
If users want to customize their connections, please provide one of the following functions:
build_mat()
: build a matrix binary connection matrix.build_csr()
: build a csr sparse connection data.build_coo()
: build a coo sparse connection data.build_conn()
: deprecated.
- Returns:
conn – A binary matrix with the shape
(num_pre, num_post)
.- Return type: