I am finding equivalent numpy expression which is equivalent to MATLAB expression like this:
[1: (arr(foo) - 1), (arr(foo) + 1): K];
where foo and K is integer, and arr is ndarray. I thought equivalent code is like this:
np.append(np.arange(0, arr[foo] - 1), np.arange((arr[foo]), K))
However, if K is 2 and arr.size is 2, these two expression is not identical. I think this is because MATLAB expression [1:1] returns 1, but np.arange(1,1) returns empty array.
How can I express above MATLAB code to Python3 code in efficient way?