This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cStringIO import StringIO | |
import numpy as np | |
import math | |
import PIL.Image | |
import IPython.display | |
import shutil | |
def show_array(a, fmt='png', filename=None): | |
a = np.uint8(np.clip(a, 0, 255)) | |
image_data = StringIO() |