Question: I want to write Python to do the following matrix manipulation import numpy as np A=np.array([[-1,2],[3,-2],[5,7]]) U,d,VT = np.linalg.svd(A) D = np.diag(d) D_inver = np.linalg.inv(D)
I want to write Python to do the following matrix manipulation
import numpy as np
A=np.array([[-1,2],[3,-2],[5,7]])
U,d,VT = np.linalg.svd(A)
D = np.diag(d)
D_inver = np.linalg.inv(D)
Dplus = np.concatenate((D_inver, np.array([[0,0]]).T),axis = 1)
Aplus = np.dot(VT.T, np.dot(Dplus,U.T)
I want to return Aplus
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
