title: Getting diagonal of a matrix in numpy and excluding an element
body: <p>I am trying to get the diagonal elements of a matrix, excluding one diagonal element. If I want the full diagonal elements, I know I can simply do <code>A.numpy.diagonal()</code> where <code>A</code> is a numpy square matrix to get the full array of diagonal elements. But I don't want <code>A[i][i]</code> for some <code>i</code>. So obviously I can delete the element corresponding to <code>i</code> from the output of <code>A.numpy.diagonal()</code>. But I think this is slower than using slicing? How would one use slicing on this problem to get all the diagonal elements excluding the component at <code>A[i][i]</code>? </p>