Member Sherman-Morrison?

You should, because of this. Actually, that was the Woodbury formula. As a special case, we have the Sherman-Morrison update, which we here implement in Python:

def sherman_morrison(M_inv, x):
        - x: (np.array) column vector
        - M_inv: (np.array) inverse of M matrix
        (M + x*x')^-1 computed using Sherman-Morrison formula
    x = x.reshape((-1, 1))
    M_inv -= / (1 +
    return M_inv
Written on May 23, 2018