49f4e83ae4323e032bdd232e466e59b4aeceb458,dataset/batch_image.py,ImagesBatch,_invert_,#ImagesBatch#Any#Any#,587

Before Change


        image = image.copy()
        if channels == "all":
            channels = list(range(image.shape[-1]))
        max_intencity = 255 if np.issubdtype(image.dtype, np.integer) else 1.
        image[..., channels] = max_intencity - image[..., channels]
        return image

    def _salt_(self, image, p_noise=.015, color=255, size=(1, 1)):

After Change


            image = PIL.ImageChops.invert(image)
        else:
            bands = list(image.split())
            channels = (channels,) if isinstance(channels, Number) else channels
            for channel in channels:
                bands[channel] = PIL.ImageChops.invert(bands[channel])
            image = PIL.Image.merge("RGB", bands)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: analysiscenter/batchflow
Commit Name: 49f4e83ae4323e032bdd232e466e59b4aeceb458
Time: 2018-03-28
Author: g.ivanov@analysiscenter.ru
File Name: dataset/batch_image.py
Class Name: ImagesBatch
Method Name: _invert_


Project Name: soft-matter/trackpy
Commit Name: 4838352d0fa07dcdb3567d201ba213099c8d5062
Time: 2017-02-04
Author: caspervdw@gmail.com
File Name: trackpy/find.py
Class Name:
Method Name: grey_dilation


Project Name: analysiscenter/batchflow
Commit Name: d381fb0787395076ecb8a3bd6984f52a16793fae
Time: 2018-03-27
Author: g.ivanov@analysiscenter.ru
File Name: dataset/batch_image.py
Class Name: ImagesBatch
Method Name: _invert_