- Timestamp:
- 10/03/11 15:13:54 (8 months ago)
- Location:
- branches/0.7
- Files:
-
- 4 modified
-
setup.py (modified) (1 diff)
-
src/common.py (modified) (2 diffs)
-
test/system/scenarios.py (modified) (1 diff)
-
test/unittests/test_lowlevelapi.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.7/setup.py
r957 r994 41 41 setup( 42 42 name = "PyNN", 43 version = "0.7. 1",43 version = "0.7.2", 44 44 package_dir={'pyNN': 'src'}, 45 45 packages = ['pyNN','pyNN.nest', 'pyNN.pcsim', 'pyNN.neuron', 'pyNN.brian', -
branches/0.7/src/common.py
r957 r994 234 234 self.parent._set_cell_initial_value(self, variable, value) 235 235 236 def as_view(self): 237 """Return a PopulationView containing just this cell.""" 238 index = self.parent.id_to_index(self) 239 return self.parent[index:index+1] 236 240 237 241 # ============================================================================= … … 329 333 """ 330 334 if isinstance(source, IDMixin): 331 source = source. parent335 source = source.as_view() 332 336 if isinstance(target, IDMixin): 333 target = target. parent337 target = target.as_view() 334 338 connector = connector_class(p_connect=p, weights=weight, delays=delay) 335 339 return projection_class(source, target, connector, target=synapse_type, rng=rng) -
branches/0.7/test/system/scenarios.py
r917 r994 492 492 493 493 sim.end() 494 495 @register() 496 def ticket195(sim): 497 """ 498 Check that the `connect()` function works correctly with single IDs (see 499 http://neuralensemble.org/trac/PyNN/ticket/195) 500 """ 501 sim.setup(timestep=0.01) 502 pre = sim.Population(10, sim.SpikeSourceArray, cellparams={'spike_times':range(1,10)}) 503 post = sim.Population(10, sim.IF_cond_exp) 504 sim.connect(pre[0], post[0], weight=0.01, delay=0.1, p=1) 505 post.record() 506 sim.run(100.0) 507 assert_arrays_almost_equal(post.getSpikes(), numpy.array([[0.0, 13.4]]), 0.5) 508 -
branches/0.7/test/unittests/test_lowlevelapi.py
r858 r994 24 24 25 25 class MockID(common.IDMixin): 26 def __init__(self):27 self.parent = "parent"28 26 def as_view(self): 27 return "view" 28 29 29 prj = connect_function(MockID(), MockID(), "weight", "delay", "synapse_type", "p", "rng") 30 projection_class.assert_called_with(" parent", "parent", "connector", target="synapse_type", rng="rng")30 projection_class.assert_called_with("view", "view", "connector", target="synapse_type", rng="rng") 31 31 32 32 def test_set():
