With numpy, you can pass a slice for each component of the index - so, your x[0:2,0:2]
example above works.
If you just want to evenly skip columns or rows, you can pass slices with three components (i.e. start, stop, step).
Again, for your example above:
>>> x[1:4:2, 1:4:2]
array([[ 5, 7],
[13, 15]])
Which is basically: slice in the first dimension, with start at index 1, stop when index is equal or greater than 4, and add 2 to the index in each pass. The same for the second dimension. Again: this only works for constant steps.
The syntax you got to do something quite different internally - what x[[1,3]][:,[1,3]]
actually does is create a new array including only rows 1 and 3 from the original array (done with the x[[1,3]]
part), and then re-slice that - creating a third array - including only columns 1 and 3 of the previous array.