There a = numpy.array([1,2])is only one dimension in your array : its shape (2,). However, your fragment a[:,0]determines the choice for two dimensions. This causes NumPy to throw an error.
a, a[0] ( ).
, , a[:,0] , , a . np.loadtxt ndmin, :
np.loadtxt(F, skiprows=0, ndmin=2)