vicellst-att / utils.py
polejowska's picture
Update utils.py
969f7a7
raw
history blame contribute delete
No virus
139 Bytes
import io
from PIL import Image
def fig2img(fig):
buf = io.BytesIO()
fig.savefig(buf)
buf.seek(0)
return Image.open(buf)