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

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

  • 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::