New answers tagged

0

A couple of mistakes on sight: def RECTSPA(A,grid): """ description: what does this do ? """ m,n = A.shape I = np.eye(n) if m >= 2*n: a = A[n+1:m,:] # ◀◀◀ A[n:], python is 0-origin Q, R = np.linalg.qr(a) T, U = schur(a,output='real') R[0:n] # ◀◀◀...


1

I was fooling around with sparse representation of K_n (tridiagonal -1 2 -1) which theoretically has a determinant of n+1. I ran across this old post. Both SuperLU and CHOLMOD don't seem to have the precision to get the correct determinant once you get above n=1e6. from scipy.sparse import diags from scipy.sparse.linalg import splu from sksparse.cholmod ...


2

The inverse of the (1,1) block of $$ \begin{bmatrix} A & B\\ C & D \end{bmatrix}^{-1} $$ is $A-BD^{-1}C$ (Schur complement). This is what you are trying to compute, if I understand correctly from your explanation ("marginalize" may be standard in your domain, but it is not standard linear algebra language). So at least you can reduce to ...


Top 50 recent answers are included