Reputation: 1577
If I have an NxN NumPy array, and I wanted to get all rows of data from just the 5th column, is there any difference between the following methods:
just_the_fifth_a = somearray[0::,4]
just_the_fifth_b = somearray[0:,4]
just_the_fifth_c = somearray[:,4]
Upvotes: 1
Views: 35
Reputation: 1573
No there is no difference between the three posted methods. You could do somearray[::,4]
as well.
Upvotes: 1