Closed matthewturk closed 6 years ago
This sets up an image canvas widget that, from Python, pushes over to the context and displays a 4 channel image.
import numpy as np import yt_pycanvas image_array = (np.random.random((100, 100, 4)) * 255).astype("uint8") image_array[...,3] = 255 hw = yt_pycanvas.ImageCanvas(image_array = image_array, width=256, height=256) display(hw)
This sets up an image canvas widget that, from Python, pushes over to the context and displays a 4 channel image.