Changeset 411
- Timestamp:
- 07/14/08 16:26:23 (3 months ago)
- Files:
-
- trunk/src/common.py (modified) (2 diffs)
- trunk/src/nest1/connectors.py (modified) (1 diff)
- trunk/src/nest2/connectors.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/common.py
r410 r411 1240 1240 self.weights = weights 1241 1241 self.delays = delays 1242 self.check_connections = check_connections1242 self.check_connections = check_connections 1243 1243 if delays is None: 1244 1244 self.delays = get_min_delay() … … 1308 1308 class FromFileConnector(Connector): 1309 1309 """ 1310 Make connections according to a list contained ina file.1310 Make connections according to a list read from a file. 1311 1311 """ 1312 1312 trunk/src/nest1/connectors.py
r409 r411 119 119 rarr = rng.uniform(0, 1, (npre,)) 120 120 # We get the list of cells that will established a connection 121 source_list = numpy.compress((distances >= 1) | ((0 < distances) & (distances < 1) & (rarr <= distances)), presynaptic_neurons).tolist()121 source_list = numpy.compress((distances >= 1) | ((0 < distances) & (distances < 1) & (rarr <= distances)), presynaptic_neurons).tolist() 122 122 # We remove the post cell if we don't allow self connections 123 123 if not self.allow_self_connections and post in source_list: 124 source_list.remove(post)124 source_list.remove(post) 125 125 N = len(source_list) 126 126 weights = self.getWeights(N) trunk/src/nest2/connectors.py
r409 r411 83 83 84 84 def connect(self, projection): 85 postsynaptic_neurons = projection.post.cell.flatten()85 postsynaptic_neurons = projection.post.cell.flatten() 86 86 npost = len(postsynaptic_neurons) 87 87 for pre in projection.pre.cell.flat:
