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

Before Change


        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)):
         Set random pixel on image to givan value.

After Change


        

        if channels == "all":
            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)
        return image

    def _salt_(self, image, p_noise=.015, color=255, size=(1, 1)):
         Set random pixel on image to givan value.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

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: dask/dask-image
Commit Name: f9aea094643fb3240193b0bc0f1908d5b84d82ab
Time: 2018-09-30
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: center_of_mass


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_


Project Name: dask/dask-image
Commit Name: c9fd2c425cb873508ba16221819574400ad2443e
Time: 2018-09-30
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: extrema