FixedPreNum

FixedPreNum#

class brainpy.connect.FixedPreNum(num, include_self=True, allow_multi_conn=False, seed=None, **kwargs)[source]#

Connect a fixed number pf pre-synaptic neurons for each post-synaptic neuron.

Parameters:
  • num (float, int) – The conn probability (if “num” is float) or the fixed number of connectivity (if “num” is int).

  • include_self (bool) – Whether create (i, i) conn ?

  • seed (None, int) – Seed the random generator.

  • allow_multi_conn (bool) –

    Allow one pre-synaptic neuron connects to multiple post-synaptic neurons?

    New in version 2.2.3.2.

build_coo()[source]#

Build a coo sparse connection data.

Returns:

conn – A tuple denoting the (pre_ids, post_ids).

Return type:

tuple