How to get the pseudo inverse of a huge diagonal matrix in python?
Just take the reciprocals of the nonzero elements. You can check with a smaller diagonal matrix that this is what pinv does.
If I have a diagonal matrix with diagonal 100Kx1 and how can I to get its pseudo inverse?
I won't be able to diagonalise the matrix and then get the inverse like I would do for small matrix so this won't work
np.linalg.pinv(np.diag(D))