code: def changeSize(self, fromLayerSize, toLayerSize):
          
          if toLayerSize <= 0 or fromLayerSize <= 0:
              raise LayerError('changeSize() called with invalid layer size.', \
                                 (fromLayerSize, toLayerSize))
          dweight = Numeric.zeros((fromLayerSize, toLayerSize), 'f')
          wed = Numeric.zeros((fromLayerSize, toLayerSize), 'f')
          wedLast = Numeric.zeros((fromLayerSize, toLayerSize), 'f')
          weight = randomArray((fromLayerSize, toLayerSize),
                               self.toLayer._maxRandom)
          # copy from old to new, considering one is smaller
          minFromLayerSize = min( fromLayerSize, self.fromLayer.size)
          minToLayerSize = min( toLayerSize, self.toLayer.size)
          for i in range(minFromLayerSize):
              for j in range(minToLayerSize):
                  wed[i][j] = self.wed[i][j]
                  wedLast[i][j] = self.wedLast[i][j]
                  dweight[i][j] = self.dweight[i][j]
                  weight[i][j] = self.weight[i][j]
          self.dweight = dweight
          self.wed = wed
          self.wedLast = wedLast
          self.weight = weight
docs: Changes the size of the connection depending on the size
          change of either source or destination layer. Should only be
          called through Network.changeLayerSize().