brainpy.connect.GridN#

class brainpy.connect.GridN(N=1, include_self=False, periodic_boundary=False)[source]#

The nearest (2*N+1) * (2*N+1) neighbors conn method.

Parameters
  • N (int) –

    Extend of the conn scope. For example: When N=1,

    [x x x] [x I x] [x x x]

    When N=2,

    [x x x x x] [x x x x x] [x x I x x] [x x x x x] [x x x x x]

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

  • periodic_boundary (bool) – Whether the neuron encode the value space with the periodic boundary. .. versionadded:: 2.2.3.2

__init__(N=1, include_self=False, periodic_boundary=False)[source]#

Methods

__init__([N, include_self, periodic_boundary])

build_conn()

build connections with certain data type.

build_coo()

Build a coo sparse connection data.

build_csr()

Build a csr sparse connection data.

build_mat()

Build a binary matrix connection data.

require(*structures)

Require all the connection data needed.

requires(*structures)

Require all the connection data needed.

Attributes

is_version2_style