When I try to get just the first element of an array like this
import numpy
a = numpy.array([1,2])
a[:,0]
I get this error
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-3-ed371621c46c> in <module>()
----> 1 a[:,0]
IndexError: too many indices
I would like to find a way to do this while still using slicing because the full code opens and reads many different files using numpy.loadtxt() all having two columns which vary from 1 to some N.