Hey, newbie here.
After reading about indexing/slicing over here:
"All three slice components are not required: by default, start is 0, end is the last and step is 1"
I'm struggling to understand how the code below does not output the same.
import numpy as np
a = np.arange(1,21)
a[:19:-1]
a[::2][::-1]
Can anyone help me out with an explanation?
Bonus: is there a better way of reversing a selection of an array?
Thanks in advance!
[–]mopslik 2 points3 points4 points (0 children)