Skip to content

Commit

Permalink
Merge pull request #467 from brainpy/doc
Browse files Browse the repository at this point in the history
fix #466
  • Loading branch information
chaoming0625 authored Aug 31, 2023
2 parents 0277bd5 + aadf8ae commit aead878
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion brainpy/_src/dynold/synapses/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def __init__(

# synaptic communications
if isinstance(conn, All2All):
self.comm = linear.AllToAll(pre.num, post.num, g_max)
self.comm = linear.AllToAll(pre.num, post.num, g_max, include_self=conn.include_self)
elif isinstance(conn, One2One):
assert post.num == pre.num
self.comm = linear.OneToOne(pre.num, g_max)
Expand Down
12 changes: 12 additions & 0 deletions brainpy/_src/dynold/synapses/tests/test_dynold_base_synapse.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

import unittest
import brainpy as bp


class Test_TwoEndConnAlignPre(unittest.TestCase):
def test1(self):
E = bp.neurons.HH(size=4)
syn = bp.synapses.AMPA(E, E, bp.conn.All2All(include_self=False))
self.assertTrue(syn.conn.include_self == syn.comm.include_self)


0 comments on commit aead878

Please sign in to comment.