f3914c312fada4bfbda42caca6aaa4c9cd00d3c7,tiny_notebook/image_proto.py,,convert_to_3_color_channels,#Any#,45
Before Change
print("Now created imags with shape", imgs.shape)
return imgs.reshape(imgs.shape[:-1]).transpose((1, 2, 3, 0))
else:
return np.array([imgs, imgs, imgs]).transpose((1, 2, 3, 0))
def convert_imgs_to_list(imgs):
Convert single images into a length 1 array.
After Change
return convert_to_3_color_channels(imgs.shape[:-1])
else:
imgs = np.array([imgs, imgs, imgs])
if len(imgs.shape) == 3:
return imgs.transpose((1, 2, 0))
elif len(imgs.shape) == 4:
return imgs.transpose((1, 2, 3, 0))
raise RuntimeError("Array shape cannot be displayed as an image.")
def convert_imgs_to_list(imgs):
Convert single images into a length 1 array.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: streamlit/streamlit
Commit Name: f3914c312fada4bfbda42caca6aaa4c9cd00d3c7
Time: 2018-01-25
Author: adrien.g.treuille@gmail.com
File Name: tiny_notebook/image_proto.py
Class Name:
Method Name: convert_to_3_color_channels
Project Name: ray-project/ray
Commit Name: d8f5b522655f2b848ba20817dd18d6e4aefb8a42
Time: 2020-04-10
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/api.py
Class Name:
Method Name: create_backend
Project Name: streamlit/streamlit
Commit Name: 87f77f89f44f4efcedcdd1495458907726eab490
Time: 2019-05-29
Author: 44782696+aaj-st@users.noreply.github.com
File Name: lib/streamlit/elements/image_proto.py
Class Name:
Method Name: marshall_images