I'm trying to fill a numpy array with a list of all of the x-coordinates of a pixel-based image. So basically, an n x m image would have n 1's, n 2's, and so on up to n m's. Is there a simple way to fill a numpy array so that this is the case? 
So far, I've thought about using numpy.concatenate, but that seems awfully tedious to have to come up with each array individually, and I'd be using a loop anyway, which wouldn't really help. numpy.flatten also comes to find, but I'd have to generate the grid first. Are there any simple solutions?