def npy_to_gif(im_list, filename): clip = mpy.ImageSequenceClip(im_list, fps=4) clip.write_gif(filename + '.gif') return