I just try to learn how to create image from array with replit.com
import numpy as np
from PIL import Image
emtpy=np.zeros((24,24))
emtpy[:,:]=[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
print(emtpy)
img=Image.fromarray(emtpy, "1")
img.save("test.png")
This is what i got:
(it's 24x24 matrix)
why they seem not similar to the array?
I already try another mode of fromarray,by change "1" to "L" and other, they still not work

("L" mode)

