05237d60ba34de18412e490865d25500040e0897,pymanopt/manifolds/grassmann.py,Grassmann,retr,#Grassmann#Any#Any#,20

Before Change


    def retr(self, X, G):
        // Calculate "thin" qr decomposition of X + G
        q, r = np.linalg.qr(X + G)
        return q

    def egrad2rgrad(self, X, G):
        // Project G into the tangent space
        GNew = G - np.dot(X, np.dot(X.T, G))

After Change


            // Calculate "thin" qr decomposition of X + G
            q, r = np.linalg.qr(X + G)
            // Unflip any flipped signs
            XNew = np.dot(q, np.diag(np.sign(np.sign(np.diag(r))+.5)))
            return XNew
        else:
            XNew = X + G
            for i in xrange(self._k):
                q, r = np.linalg.qr(Y[i])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pymanopt/pymanopt
Commit Name: 05237d60ba34de18412e490865d25500040e0897
Time: 2015-12-03
Author: jamiehntownsend@gmail.com
File Name: pymanopt/manifolds/grassmann.py
Class Name: Grassmann
Method Name: retr


Project Name: sony/nnabla
Commit Name: 0f133cd9df608851bbe954e64524117f7700bcd7
Time: 2020-06-09
Author: Kazuki.Yoshiyama@sony.com
File Name: python/test/function/test_round.py
Class Name:
Method Name: ref_round


Project Name: loli/medpy
Commit Name: 037d624d1c0d4a4cbeaa060846925f480beaa509
Time: 2014-04-25
Author: oskar.maier@googlemail.com
File Name: medpy/io/header.py
Class Name:
Method Name: __get_offset_nibabel