def makepairs(x, y):
 xy = array([[a, b] for a in asarray(x) for b in asarray(y)])
 return xy.T

def makepairs ( x , y ) : xy = array ( [ [ a , b ] for a in asarray ( x ) for b in asarray ( y ) ] ) return xy . T
helper function to create an array of pairs of x and y .