Salve,volevo sapere come funziona il metodo _repr_png __ contenuto nel file image.py e a cosa serve il modulo io
class Immagine:
def __init__(self, img):
self.pixels = img
def _repr_png_(self):
img = png.from_array(self.pixels, 'RGB')
b = io.BytesIO()
img.save(b)
return b.getvalue()