4f35ee23064994397d73cc814ceaf39078b8d60d,kraken/linegen.py,,degrade_line,#Any#Any#Any#Any#,151

Before Change


        a[coords] = 0
        return array2pil(a)

    im = add_gaussian(im, mean, sigma)
    return add_salt_and_pepper(im, density)


def distort_line(im, distort=3.0, sigma=10.0):
    

After Change


    im = pil2array(im)
    m = np.amax(im)
    im = gaussian_filter(im.astype("f")/m, 0.5)
    im += np.random.normal(mean, sigma, im.shape)
    flipped = np.ceil(density/2 * im.size)
    coords = [np.random.randint(0, i - 1, int(flipped)) for i in im.shape]
    im[coords] = 255
    coords = [np.random.randint(0, i - 1, int(flipped)) for i in im.shape]
    im[coords] = 0
    return array2pil(np.clip(im * m, 0, 255).astype("uint8"))


def distort_line(im, distort=3.0, sigma=10.0):
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: mittagessen/kraken
Commit Name: 4f35ee23064994397d73cc814ceaf39078b8d60d
Time: 2015-12-21
Author: mittagessen@l.unchti.me
File Name: kraken/linegen.py
Class Name:
Method Name: degrade_line


Project Name: jonathf/chaospy
Commit Name: 0b10d5eaa6abb77198e8eb025fea759c4629bca6
Time: 2020-10-21
Author: jonathf@users.noreply.github.com
File Name: chaospy/distributions/collection/trunc_normal.py
Class Name: trunc_normal
Method Name: _lower


Project Name: jonathf/chaospy
Commit Name: 0b10d5eaa6abb77198e8eb025fea759c4629bca6
Time: 2020-10-21
Author: jonathf@users.noreply.github.com
File Name: chaospy/distributions/collection/trunc_normal.py
Class Name: trunc_normal
Method Name: _upper