I have an assignment from my university. They asked me to analyse a slicing operation and explain it.
A = array([[1,2,3],[4,5,6],[7,8,9]])
A[0,arrange(3)<>0]
A[1,arrange(3)<>1]
A[2,arrange(3)<>2]
The operation to analyse is the following: A[k, arange(n)<>k]
, where A is a n x n matrix.
The way I understand it, the first k determines the row of the matrix.
Now I know that arange(n)
creates an array containing n numbers. What I don't understand is the command arange(n)<>k
. If I try to reproduce the code on my computer, the program just tells me "invalid syntax" and points at <>
.
Can anyone explain to me whats happening?
Thank you!