XNew = X + G
for i in xrange(self._k):
q, r = np.linalg.qr(Y[i])
XNew[i] = np.dot(q, np.diag(np.sign(np.sign(np.diag(r))+.5)))
def norm(self, X, G):
// Norm on the tangent space is simply the Euclidean norm.
After Change
// Compute the polar factorization of Y = X+G
u, s, v = svd(X + G, full_matrices=False)
XNew = u.dot(v.T);
else:
XNew = np.zeros(np.shape(X))
for i in xrange(self._k):