I\'m using numpy to initialize a pixel array to a gray checkerboard (the classic representation for \"no pixels\", or transparent). It seems like there ought to be a whizzy
Can't you use hstack and vstack? See here. Like this:
>>> import numpy as np >>> b = np.array([0]*4) >>> b.shape = (2,2) >>> w = b + 0xAA >>> r1 = np.hstack((b,w,b,w,b,w,b)) >>> r2 = np.hstack((w,b,w,b,w,b,w)) >>> board = np.vstack((r1,r2,r1,r2,r1,r2,r1))