2ee7ee03dd71cf59f7977beb0ed53738e2ac8349,pyimgaug/parameters.py,DiscreteUniform,__init__,#DiscreteUniform#Any#Any#,50

Before Change



class DiscreteUniform(StochasticParameter):
    def __init__(self, a, b=None):
        if isinstance(a, DiscreteUniform):
            self.a = a.a
            self.b = a.b
        elif isinstance(a, int):
            assert b is not None and isinstance(b, int)
            assert a <= b
            self.a = a
            self.b = b
        else:
            raise Exception("Expected two int values or DiscreteUniform object, got %s, %s." % (type(a), type(b)))

    def _draw_samples(self, size, random_state):
        return random_state.randint(self.a, self.b, size)

After Change


        else:
            self.a = a

        if isinstance(b, int):
            self.b = Deterministic(b)
        else:
            self.b = b

    def _draw_samples(self, size, random_state):
        a = self.a.draw_sample(random_state=random_state)
        b = self.b.draw_sample(random_state=random_state)
        if a > b:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: aleju/imgaug
Commit Name: 2ee7ee03dd71cf59f7977beb0ed53738e2ac8349
Time: 2016-11-10
Author: kontakt@ajung.name
File Name: pyimgaug/parameters.py
Class Name: DiscreteUniform
Method Name: __init__


Project Name: aleju/imgaug
Commit Name: 2ee7ee03dd71cf59f7977beb0ed53738e2ac8349
Time: 2016-11-10
Author: kontakt@ajung.name
File Name: pyimgaug/parameters.py
Class Name: Uniform
Method Name: __init__


Project Name: aleju/imgaug
Commit Name: a1ffcada5b90540eb10187f632f1947eae0849a2
Time: 2016-11-20
Author: kontakt@ajung.name
File Name: pyimgaug/augmenters2.py
Class Name: Multiply
Method Name: __init__