fbc4b0cbb4956fecce389a6e76f22f2112c84768,chaospy/distributions/collection/discrete_uniform.py,DiscreteUniform,_cdf,#DiscreteUniform#Any#Any#Any#,43

Before Change



    def _cdf(self, x_data, lower, upper):
        Cumulative distribution function.
        return ((numpy.floor(x_data)-numpy.ceil(lower))/
                (numpy.floor(upper)-numpy.ceil(lower)))

    def _lower(self, lower, upper):
        Lower bounds.
        return numpy.ceil(lower)

After Change


    def _cdf(self, x_data, lower, upper):
        Cumulative distribution function.
        lower = numpy.round(lower)
        upper = numpy.round(upper)
        out = (x_data-lower+0.5)/(upper-lower+1)
        return out

    def _lower(self, lower, upper):
        Lower bounds.
        return numpy.round(lower)-0.5
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: jonathf/chaospy
Commit Name: fbc4b0cbb4956fecce389a6e76f22f2112c84768
Time: 2020-07-13
Author: jonathf@users.noreply.github.com
File Name: chaospy/distributions/collection/discrete_uniform.py
Class Name: DiscreteUniform
Method Name: _cdf


Project Name: jonathf/chaospy
Commit Name: fbc4b0cbb4956fecce389a6e76f22f2112c84768
Time: 2020-07-13
Author: jonathf@users.noreply.github.com
File Name: chaospy/distributions/collection/discrete_uniform.py
Class Name: DiscreteUniform
Method Name: _ppf


Project Name: ncullen93/torchsample
Commit Name: 70b15bde1d8a1b29d24f23bac1a28a63be0fb4d2
Time: 2017-04-20
Author: ncullen@modv-vlan533.0018.apn.wlan.med.upenn.edu
File Name: torchsample/modules/super_module.py
Class Name: SuperModule
Method Name: evaluate_loader