select a column of numpy array

Solutions on MaxInterview for select a column of numpy array by the best coders in the world

showing results for - "select a column of numpy array"
Leandra
01 Apr 2017
1test = numpy.array([
2  [1, 2], [3, 4], [5, 6]
3])
4
5>>> test[:,0]
6array([1, 3, 5])
7
8>>> test[:,[0]]
9array([[1],
10       [3],
11       [5]])