code: def _forwardImplementation(self, inbuf, outbuf):
          
          assert self.module
  
          propensities = self.module.getActionValues(0)
  
          summedProps = sum(propensities)
          probabilities = propensities / summedProps
  
          action = eventGenerator(probabilities)
  #        action = drawIndex(probabilities)
  
          outbuf[:] = scipy.array([action])
docs: Proportional probability method.