4bfb9efb1f0e955922889187727e33185e97d934,neural_style.py,,imread,#Any#,142

Before Change




def imread(path):
    return scipy.misc.imread(path).astype(np.float)


def imsave(path, img):
    img = np.clip(img, 0, 255).astype(np.uint8)

After Change


    img = scipy.misc.imread(path).astype(np.float)
    if len(img.shape) == 2:
        // grayscale
        img = np.dstack((img,img,img))
    return img


def imsave(path, img):
    img = np.clip(img, 0, 255).astype(np.uint8)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: anishathalye/neural-style
Commit Name: 4bfb9efb1f0e955922889187727e33185e97d934
Time: 2016-12-09
Author: me@anishathalye.com
File Name: neural_style.py
Class Name:
Method Name: imread


Project Name: matplotlib/matplotlib
Commit Name: 5e7ffdae5326691faeb6faad4828f62ff9720681
Time: 2020-03-12
Author: anntzer.lee@gmail.com
File Name: lib/mpl_toolkits/axes_grid1/axes_rgb.py
Class Name:
Method Name: imshow_rgb


Project Name: luispedro/mahotas
Commit Name: 7f5d55e309efbd0eee135ff5af520e3ddea310fb
Time: 2010-11-12
Author: lpc@cmu.edu
File Name: mahotas/freeimage.py
Class Name:
Method Name: _array_from_bitmap


Project Name: donlnz/nonconformist
Commit Name: aab2ef03ff533c1160742fafd2bf12133e227ddb
Time: 2015-03-19
Author: henrik.linusson@gmail.com
File Name: nonconformist/ensemble.py
Class Name: AggregatedCp
Method Name: predict