I have a small problem, as I am learning Python. I am trying to slice a 2D-array in a particular way : taking one item over two, but at each line we begin at a different index, for example if we have a = np.reshape(np.arange(16),(4,4)) , so
>>print(a) = [[ 0 1 2 3]
[ 4 5 6 7]
[ 8 9 10 11]
[12 13 14 15]]
We would like to end with
>>print(new_a) = [[ 0 2]
[ 5 7]
[ 8 10]
[13 15]]
I am sure that it is not too complicated, but I couldn't find the answer :( (I now how to slice a np-array, just not how to change each row)
Thank you and have a nice day !