2ee7ee03dd71cf59f7977beb0ed53738e2ac8349,pyimgaug/parameters.py,Uniform,__init__,#Uniform#Any#Any#,94

Before Change


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

    def _draw_samples(self, size, random_state):

After Change


        else:
            self.a = a

        if isinstance(b, (int, float)):
            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: 16

Instances


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: 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: 2ee7ee03dd71cf59f7977beb0ed53738e2ac8349
Time: 2016-11-10
Author: kontakt@ajung.name
File Name: pyimgaug/parameters.py
Class Name: Normal
Method Name: __init__