def createXYs(x, y=None):
 if (y is None):
  y = x
 xs = numpy.resize(x, (len(x) * len(y)))
 ys = numpy.repeat(y, len(x))
 return numpy.vstack([xs, ys]).transpose()

def createXYs ( x , y = None ) : if ( y is None ) : y = x xs = numpy . resize ( x , ( len ( x ) * len ( y ) ) ) ys = numpy . repeat ( y , len ( x ) ) return numpy . vstack ( [ xs , ys ] ) . transpose ( )
create an nx2 array of xy values including all combinations of the x and y values provided .