pylab 中 svd的调用接口跟matlab 有点不同, 浪费了不少排查时间, 谨记!
Us, Ds, Vs = svd(DD)
display( ('svd', norm(Us @ diag(Ds) @ Vs - DD , 'fro'), norm(DD,'fro') ))
Ws, Us = eigh(DD)
display(('eigh' , norm(Us @ diag(Ws) @ Us.T - DD , 'fro'), norm(DD,'fro') ) )
pylab 中 svd的调用接口跟matlab 有点不同, 浪费了不少排查时间, 谨记!
Us, Ds, Vs = svd(DD)
display( ('svd', norm(Us @ diag(Ds) @ Vs - DD , 'fro'), norm(DD,'fro') ))
Ws, Us = eigh(DD)
display(('eigh' , norm(Us @ diag(Ws) @ Us.T - DD , 'fro'), norm(DD,'fro') ) )