4fed19b4173673a3efecb70ccb63aae53be924fa,helper/utilty.py,,save_image,#Any#Any#Any#,110

Before Change


    if directory != "" and not os.path.exists(directory):
        os.makedirs(directory)

    image = misc.toimage(image, cmin=0, cmax=255)  // to avoid range rescaling
    misc.imsave(filename, image)

    if print_console:

After Change


    if len(image.shape) >= 3 and image.shape[2] == 3:
        image = Image.fromarray(image, mode="RGB")  // to avoid range rescaling (cmin=0, cmax=255)
    else:
        image = Image.fromarray(image)  // to avoid range rescaling (cmin=0, cmax=255)
    imageio.imwrite(filename, image)

    if print_console:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: jiny2001/dcscn-super-resolution
Commit Name: 4fed19b4173673a3efecb70ccb63aae53be924fa
Time: 2020-09-08
Author: yamanakaj@google.com
File Name: helper/utilty.py
Class Name:
Method Name: save_image


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 6edace1d1ee1af5a43d93781b7bf299a20440a0d
Time: 2018-09-26
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/visualization.py
Class Name:
Method Name: save_image


Project Name: MLWave/kepler-mapper
Commit Name: 3048096493b85388ca00fc87c052e99767bddfc3
Time: 2021-03-04
Author: dave@daveeargle.com
File Name: examples/plot_digits.py
Class Name:
Method Name: