4d77268c95b8a041a3bac848860765afdad1af46,pymc3/distributions/discrete.py,DiscreteUniform,__init__,#DiscreteUniform#Any#Any#,300

Before Change


    
    def __init__(self, lower, upper, *args, **kwargs):
        super(DiscreteUniform, self).__init__(*args, **kwargs)
        self.lower = T.floor(lower).astype("int32")
        self.upper = T.floor(upper).astype("int32")
        self.mode = T.floor((upper - lower) / 2.).astype("int32")

    def _random(self, lower, upper, size=None):
        // This way seems to be the only to deal with lower and upper

After Change


    
    def __init__(self, lower, upper, *args, **kwargs):
        super(DiscreteUniform, self).__init__(*args, **kwargs)
        self.lower, self.upper = floor(lower).astype("int32"), floor(upper).astype("int32")
        self.mode = floor((upper - lower) / 2.).astype("int32")

    def _random(self, lower, upper, size=None):
        // This way seems to be the only to deal with lower and upper as array-like.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: pymc-devs/pymc3
Commit Name: 4d77268c95b8a041a3bac848860765afdad1af46
Time: 2015-12-23
Author: chris.fonnesbeck@vanderbilt.edu
File Name: pymc3/distributions/discrete.py
Class Name: DiscreteUniform
Method Name: __init__


Project Name: pymc-devs/pymc3
Commit Name: 459a1ca35c12ed8da7f5684f52180c6d22d41492
Time: 2015-12-23
Author: superbobry@gmail.com
File Name: pymc3/distributions/discrete.py
Class Name: DiscreteUniform
Method Name: __init__


Project Name: pymc-devs/pymc3
Commit Name: 4d77268c95b8a041a3bac848860765afdad1af46
Time: 2015-12-23
Author: chris.fonnesbeck@vanderbilt.edu
File Name: pymc3/distributions/discrete.py
Class Name: DiscreteUniform
Method Name: __init__


Project Name: pymc-devs/pymc3
Commit Name: 7ba3ea351aff34e26302b942a715a626e7823f22
Time: 2015-12-25
Author: superbobry@gmail.com
File Name: pymc3/distributions/discrete.py
Class Name: DiscreteUniform
Method Name: __init__