Re: [Numpy-discussion] Extracting individual columns in Numpy

Oct. 8, 2014
11:55 p.m.
import numpy as np a = np.array([[1,2,3],[4,5,6],[7,8,9]]) a[0][:] a[:][0]
Now both a[:][0] and a[0][:] are outputting the same result, i.e np.array([1,2,3]). If I want to extract the array [[1],[4],[7]] then what should I do? Is it possible to add this feature? The feature is already there: a[:, 0] -- _____________________________________ Dr. Andrew Nelson _____________________________________
3846
Age (days ago)
3846
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andrew Nelson