Render a 2D ndarray to a canvas element.