wouldn't it be much faster using the indexing tricks, i.e. 11image = np.zeros(...) image[1:, :] = original[:-1, :]``