A linear system A @ x = b can be solved in (at least) two ways:
- evaluate the inverse explicitly and apply it to
b, i.e.,x = np.linalg.inv(A) @ b. - use
x = np.linalg.solve(A, b).
The latter is usually preferred for both performance and numerical reasons. Is there an analogue to solve for the pseudoinverse pinv? In other words, I'm looking for a function psolve such that psolve(A, b) == np.linalg.pinv(A) @ b.