def _updateShaping(self):
        assert self.numberOfCenters == 1
        possible = self.shapingFunction.getPossibleParameters(self.windowSize)
        matchValues = []
        pdfs = [multivariateNormalPdf(s, self.mus[0], self.sigmas[0])
                for s in self.samples]

        for p in possible:
            self.shapingFunction.setParameter(p)
            transformedFitnesses = self.shapingFunction(self.fitnesses)
            #transformedFitnesses /= sum(transformedFitnesses)
            sumValue = sum([x * log(y) for x, y in zip(pdfs, transformedFitnesses) if y > 0])
            normalization = sum([x * y for x, y in zip(pdfs, transformedFitnesses) if y > 0])
            matchValues.append(sumValue / normalization)


        self.shapingFunction.setParameter(possible[argmax(matchValues)])

        if len(self.allsamples) % 100 == 0:
            print((possible[argmax(matchValues)]))
            print((fListToString(matchValues, 3)))
A second call to wait() returns same value as the first call.
dataset/ETHPy150Open pybrain/pybrain/pybrain/optimization/distributionbased/fem.py/FEM._updateShaping--crossover with--dataset/ETHPy150Open itamarst/crochet/crochet/tests/test_api.py/EventualResultTests.test_success_result_twice