I would like a list of 2d NumPy arrays (x,y) , where each x is in {-5, -4.5, -4, -3.5, ..., 3.5, 4, 4.5, 5} and the same for y.
I could do
x = np.ar
I think you want np.meshgrid:
Return coordinate matrices from coordinate vectors.
Make N-D coordinate arrays for vectorized evaluations of N-D scalar/vector fields over N-D grids, given one-dimensional coordinate arrays x1, x2,..., xn.
import numpy as np
x = np.arange(-5, 5.1, 0.5)
y = np.arange(-5, 5.1, 0.5)
X,Y = np.meshgrid(x,y)
you can convert that to your desired output with
XY=np.array([X.flatten(),Y.flatten()]).T
print XY
array([[-5. , -5. ],
[-4.5, -5. ],
[-4. , -5. ],
[-3.5, -5. ],
[-3. , -5. ],
[-2.5, -5. ],
....
[ 3. , 5. ],
[ 3.5, 5. ],
[ 4. , 5. ],
[ 4.5, 5. ],
[ 5. , 5. ]])