My question can be a duplicate but I can't find the answer.
I have a numpy array:
In[1]: b
Out[1]:
array([[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11],
[12, 13, 14, 15]])
And I want to select some features from this array.
For example:
In [1]: select(b,0,3)
Out [1]:
array([[ 0, 3],
[ 4, 7],
[ 8, 11],
[ 12, 15]])
In[2]: select(b,1,3)
out [2]:
array([[ 1, 3],
[ 5, 7],
[ 9, 11],
[13, 15]])