Changeset 722
- Timestamp:
- 03/03/10 10:53:42 (2 years ago)
- Location:
- trunk/src
- Files:
-
- 2 modified
-
connectors.py (modified) (1 diff)
-
space.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/connectors.py
r721 r722 534 534 assert isinstance(space, Space) 535 535 self.space = space 536 537 538 def connect(self, projection): 539 """Connect-up a Projection.""" 540 p = {} 541 for src in projection.pre.all(): 542 local = projection.post._mask_local.flatten() 543 d = self.space.distances(src.position, projection.post.positions, post_mask=local) 536 537 538 def connect(self, projection): 539 """Connect-up a Projection.""" 540 p = {} 541 local = projection.post._mask_local.flatten() 542 positions = self.space.scale_factor*(projection.post.positions + self.space.offset) 543 544 for src in projection.pre.all(): 545 d = self.space.distances(src.position, positions, post_mask=local) 544 546 p[src] = eval(self.d_expression).flatten() 545 547 if p[src].dtype == 'bool': -
trunk/src/space.py
r721 r722 63 63 if len(B.shape) == 1: 64 64 B = B.reshape(3, 1) 65 B = self.scale_factor*(B + self.offset) 65 # I'm not sure the following line should be here. Operations may be redundant and not very 66 # transparent from the user point of view. I moved it into the DistanceDependentProbability Connector 67 #B = self.scale_factor*(B + self.offset) 66 68 d = numpy.zeros((A.shape[1], B.shape[1]), dtype=A.dtype) 67 69 for axis in self.axes:
