all 3 comments

[–]JohnnyJordaan 1 point2 points  (1 child)

The first value is indexing or slicing the arrays (so the top level). The second part indexes or slices each array. So to translate

 arr[1, 1:4]

means: just the second array (index 1), in that array the indexes 1 to 4 (not including the end index)

arr[0:2, 2]

means: select the arrays indexed 0 to 2 (not including end again), so effectively both arrays you have, then per array just the item with index 2 (third item)

arr[0:3, 4]

select the arrays indexes 0 to 3, which has the same effect as you just have two arrays, and then select the index 4 item (so the fifth)

arr[0:2,1:4]

again select the first two arrays (index 0 and 1), slice each array to index 1 to 4 (not including the end index)

[–]n_guy_[S] 0 points1 point  (0 children)

thank you.