import numpy as np

def slow(a):
    b = np.array(zip(a.T, a.T))
b.shape = 2 * len(a[0]), 2
return b.T

def fast(a):
    return a.repeat(2).reshape(2, 2 * len(a[0]))

def faster(a):
    return a.repeat(2, axis=1)
Interleave a numpy array with itself