[docs]defnumber_image(i,Nx:int,Ny:int):"""Create a image that shows the number. Parameters ---------- i: int Number to be displayed on the DMD. Nx: int Number of pixel of the DMD in x direction (width). Ny: int Number of pixel of the DMD in y direction (height). Returns ------- img: numpy.ndarray The binary image that contains the number. """img=Image.new('1',(Nx,Ny))draw=ImageDraw.Draw(img)fnt_default=ImageFont.truetype(_font_path,size=Ny//2)draw.text((0,Ny//4),str(i),(1),font=fnt_default,align='center')returnnp.array(img,dtype=np.bool)