I want to get the slice of x[start1:stop1:step1 ] and x[start2:stop2:step2] in a single array.
Is there any syntax in Python like this:
x[start1:stop1:step1 + start2:stop2:step2]
In Matlab it is simply:
x(start1:step1:stop1 start2:step2:stop2)
update:
I see many answers suggest concatenation.
My intial goal is to do slice for higher dimension array, for example in 2D:
x[start1:stop1 + start2:stop2, start3:stop3 + start4:stop4]
Concatenation is okay. But it seems too complicated in high dimension.
Is there a way as simple as Matlab?
x(start1:stop1 start2:stop2, start3:stop3 start4:stop4 )
can we concatenate the array index, instead of the array itself?

