@@ -191,7 +191,7 @@ def _standard_connect(self, projection, connection_map_generator, distance_map=N
191191 # `source_mask` - boolean numpy array, indicating which of the pre-synaptic neurons should be connected to,
192192 # or a single boolean, meaning connect to all/none of the pre-synaptic neurons
193193 # It can also be an array of addresses
194- _proceed = False
194+ _proceed = False
195195 if source_mask is True or source_mask .any ():
196196 _proceed = True
197197 elif type (source_mask ) == numpy .ndarray :
@@ -206,7 +206,7 @@ def _standard_connect(self, projection, connection_map_generator, distance_map=N
206206 source_mask = numpy .arange (projection .pre .size , dtype = int )
207207 elif source_mask .dtype == bool :
208208 source_mask = source_mask .nonzero ()[0 ]
209-
209+
210210 # Evaluate the lazy arrays containing the synaptic parameters
211211 connection_parameters = {}
212212 for name , map in parameter_space .items ():
@@ -275,6 +275,10 @@ def __init__(self, allow_self_connections=True, safe=True,
275275 def connect (self , projection ):
276276 if not self .allow_self_connections and projection .pre == projection .post :
277277 connection_map = LazyArray (lambda i , j : i != j , shape = projection .shape )
278+ # there is a more complicated scenario, where we connect two different
279+ # views of the same population. In this case, something other than i != j
280+ # will be needed. It should at least be documented that we currently
281+ # don't handle this situation.
278282 elif self .allow_self_connections == 'NoMutual' and projection .pre == projection .post :
279283 connection_map = LazyArray (lambda i , j : i > j , shape = projection .shape )
280284 else :
@@ -555,7 +559,7 @@ class FromFileConnector(FromListConnector):
555559
556560 # columns = ["i", "j", "weight", "delay", "U", "tau_rec"]
557561
558- Note that the header requires `#` at the beginning of the line.
562+ Note that the header requires `#` at the beginning of the line.
559563
560564 `distributed`:
561565 if this is True, then each node will read connections from a file
@@ -1011,7 +1015,7 @@ def connect(self, projection):
10111015
10121016 # Assume that targets are equally distributed over processes
10131017 targets_per_process = int (len (projection .post ) / num_processes )
1014-
1018+
10151019 # Calculate the number of synapses on each process
10161020 bino = RandomDistribution ('binomial' ,
10171021 [self .n , targets_per_process / len (projection .post )],
@@ -1027,7 +1031,7 @@ def connect(self, projection):
10271031 sum_dist += targets_per_process
10281032 sum_partitions += num_conns_on_vp [k ]
10291033
1030- # Draw random sources and targets
1034+ # Draw random sources and targets
10311035 connections = [[] for i in range (projection .post .size )]
10321036 possible_targets = numpy .arange (projection .post .size )[projection .post ._mask_local ]
10331037 for i in range (num_conns_on_vp [rank ]):
0 commit comments