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
s = np.shape(images)
if not ((len(s) == 4 and s[-1] == 1) or len(s) == 3):
raise ValueError("Unexpected shape for grayscale images:" + str(s) )
if s[-1] == 1:
// Squeeze channel axis if it exists
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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: bokeh/bokeh
Commit Name: ded044ebee429e8e1b8dbd7e581bfb9634be7354
Time: 2015-09-08
Author: nroth@dealnews.com
File Name: bokeh/charts/builder/line_builder.py
Class Name: LineBuilder
Method Name: _yield_renderers
Project Name: pantsbuild/pants
Commit Name: dee363930f4d4f37438695128e082a1266253d26
Time: 2021-01-05
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/macros/python_requirements.py
Class Name: PythonRequirements
Method Name: __call__