601d77a77a55323770bb2b214aa8844538b13d1f,art/visualization.py,,convert_to_rgb,#Any#,51
Before Change
s = np.shape(images)
rgb_images = np.zeros(shape=(s[0], s[1], s[2], 3))
for i, img in enumerate(images):
new_image = cv2.cvtColor(img, cv2.COLOR_GRAY2RGB)
rgb_images[i] = new_image
return rgb_images
def save_image(image, f_name):
After Change
rgb_images = np.squeeze(images, axis=-1)
else:
rgb_images = images
rgb_images = np.stack((rgb_images,) * 3, axis=-1)
return rgb_images
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 601d77a77a55323770bb2b214aa8844538b13d1f
Time: 2018-09-25
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/visualization.py
Class Name:
Method Name: convert_to_rgb
Project Name: metagenome-atlas/atlas
Commit Name: 3ab0e54a3ce88c7018a34192461dd47e5867d357
Time: 2017-01-28
Author: joe.brown@pnnl.gov
File Name: atlas/tables.py
Class Name:
Method Name: col_split
Project Name: hmmlearn/hmmlearn
Commit Name: 1454a10605094c327ec548162e642b81707cfa75
Time: 2019-12-15
Author: anntzer.lee@gmail.com
File Name: lib/hmmlearn/hmm.py
Class Name: GMMHMM
Method Name: _init
Project Name: GPflow/GPflow
Commit Name: 0b9e1f064ab1ce1d994f86686e7d662a46095e36
Time: 2020-03-30
Author: st--@users.noreply.github.com
File Name: doc/source/notebooks/advanced/mcmc.pct.py
Class Name:
Method Name: marginal_samples