540c23fb4207c2eecb5d28ce486e44e4cd5dbc07,scipy/stats/_continuous_distns.py,genpareto_gen,_munp,#genpareto_gen#Any#Any#,1441

Before Change


    def _munp(self, n, c):
        if c != 0:
            k = arange(0, n+1)
            val = (-1.0/c)**n * sum(comb(n, k)*(-1)**k / (1.0-c*k), axis=0)
            return where(c*n < 1, val, inf)
        else:
            return gam(n+1)

    def _entropy(self, c):

After Change


            for ki, cnk in zip(k, comb(n, k)):
                val = val + cnk * (-1) ** ki / (1.0 - c * ki)
            return where(c * n < 1, val * (-1.0 / c) ** n, inf)
        return _lazywhere(c != 0, (c,),
                lambda c: __munp(n, c),
                gam(n + 1))

    def _entropy(self, c):
        return 1. + c
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: scipy/scipy
Commit Name: 540c23fb4207c2eecb5d28ce486e44e4cd5dbc07
Time: 2014-07-23
Author: evgeni@burovski.me
File Name: scipy/stats/_continuous_distns.py
Class Name: genpareto_gen
Method Name: _munp


Project Name: scipy/scipy
Commit Name: 5ddb2a451aadc718e42ee9d2505058f57aa80165
Time: 2013-12-30
Author: ralf.gommers@googlemail.com
File Name: scipy/stats/_discrete_distns.py
Class Name: dlaplace_gen
Method Name: _cdf


Project Name: scipy/scipy
Commit Name: 9718599d3117f75db7d0d8fdbe19c80ec2c0bb75
Time: 2014-07-23
Author: evgeni@burovski.me
File Name: scipy/stats/_continuous_distns.py
Class Name: genpareto_gen
Method Name: _logpdf