Den 30.01.2011 21:40, skrev Charles R Harris: > Well, strictly speaking, both documentations say the same thing, but > the old version was somewhat obfuscated. Either svd returns v.H and A > = dot(u*d, v.H) or svd returns v and A = dot(u*d,v). I think the > second is a clearer statement of the return value and the resulting > factorization, but I suppose some may hold a different opinion.
I agree that it is a clearer statement, since there is a difference between A = dot(u*d, v.H) and A = dot(u*d, vH), and we actually have the latter. Still, the common definition of SVD is u * s * v.H = x and not u * s * v = x This might be a bit confusing for those expecting the conjugate transpose of v in the decomposition. Be aware that Matlab's SVD is [u,s,v] = svd(x) so that u*s*v' = x. Clearly Matlab and NumPy differ on the definition of v here, with Matlab following the common convention. That is why I prefer the old notation u, s, vH = np.linalg.svd(x) v = vH.H as it leaves no room for confusion. As long as the behaviour of SVD has not changed, none of my SVD code will break. That was what worried me most :-) Sturla _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion