Ejemplo n.º 1
0
 def test_connect(self):
     syn = sim.StaticSynapse(weight=5.0, delay=0.5)
     C = connectors.CloneConnector(self.ref_prj)
     prj = sim.Projection(self.p1, self.p2, C, syn)
     self.assertEqual(prj.get(["weight", "delay"], format='list', gather=False),  # use gather False because we are faking the MPI
                      [(0, 1, 5.0, 0.5),
                       (2, 3, 5.0, 0.5)])
Ejemplo n.º 2
0
 def test_connect(self, sim=sim):
     syn = sim.StaticSynapse(weight=5.0, delay=0.5)
     C = connectors.CloneConnector(self.ref_prj)
     prj = sim.Projection(self.p1, self.p2, C, syn)
     self.assertEqual(prj.get(["weight", "delay"], format='list'),
                      [(0, 0, 5.0, 0.5),
                       (3, 0, 5.0, 0.5),
                       (0, 1, 5.0, 0.5),
                       (2, 2, 5.0, 0.5),
                       (2, 3, 5.0, 0.5)])
Ejemplo n.º 3
0
 def test_connect_with_pre_post_mismatch(self, sim=sim):
     syn = sim.StaticSynapse()
     C = connectors.CloneConnector(self.ref_prj)
     p3 = sim.Population(5, sim.IF_cond_exp(), structure=space.Line())
     self.assertRaises(errors.ConnectionError, sim.Projection, self.p1, p3, C, syn)