Changeset 716
- Timestamp:
- 02/19/10 16:58:37 (2 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
doc/highlevelapi.txt (modified) (1 diff)
-
src/connectors.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/highlevelapi.txt
r708 r716 405 405 In more abstract models, it is often useful to be able to avoid edge effects by specifying periodic boundary conditions, e.g.:: 406 406 407 >>> connector = DistanceDependentProbabilityConnector("exp(-abs(d))", space=Space(periodic_boundaries=( 500, 500, 0)))407 >>> connector = DistanceDependentProbabilityConnector("exp(-abs(d))", space=Space(periodic_boundaries=((0,500), (0,500), None))) 408 408 409 409 calculates distance on the surface of a torus of circumference 500 µm (wrap-around in the x- and y-dimensions but not z). -
trunk/src/connectors.py
r713 r716 61 61 self.w_index = 0 # should probably use a generator 62 62 self.d_index = 0 # rather than storing these values 63 self.weights = weights 64 self.delays = delays 63 if isinstance(weights, basestring): 64 self.w_expr = weights 65 self.weights = numpy.empty((1,0)) 66 else: 67 self.weights = weights 68 if isinstance(delays, basestring): 69 self.d_expr = delays 70 self.delays = numpy.empty((1,0)) 71 else: 72 self.delays = delays 65 73 66 74 if delays is None: … … 540 548 self.weights = numpy.concatenate((self.weights, eval(self.w_expr)), axis=1) 541 549 if hasattr(self, 'd_expr'): 550 delays = eval(self.d_expr) 542 551 self.delays = numpy.concatenate((self.delays, eval(self.d_expr)), axis=1) 543 552 if hasattr(self.weights, 'shape'): self.weights = self.weights.flatten()
