5ded2b734290836869a549a7c0e4be7d46d4bde4,scipy/sparse/linalg/eigen/lobpcg/lobpcg.py,,_b_orthonormalize,#Any#Any#Any#Any#,86

Before Change


            blockVectorBV = blockVectorV  // Shared data!!!
    gramVBV = np.dot(blockVectorV.T.conj(), blockVectorBV)
    gramVBV = cholesky(gramVBV)
    gramVBV = inv(gramVBV, overwrite_a=True)
    // gramVBV is now R^{-1}.
    blockVectorV = np.dot(blockVectorV, gramVBV)
    if B is not None:
        blockVectorBV = np.dot(blockVectorBV, gramVBV)

After Change




def _b_orthonormalize(B, blockVectorV, blockVectorBV=None, retInvR=False):
    normalization = blockVectorV.max(axis=0)
    blockVectorV = blockVectorV / normalization
    if blockVectorBV is None:
        if B is not None:
            blockVectorBV = B(blockVectorV)
        else:
            blockVectorBV = blockVectorV  // Shared data!!!
    else:
        blockVectorBV = blockVectorBV / normalization
    VBV = blockVectorV.T.conj() @ blockVectorBV
    try:
        // VBV is a Cholesky factor from now on...
        VBV = cholesky(VBV, overwrite_a=True)
        VBV = inv(VBV, overwrite_a=True)
        blockVectorV = blockVectorV @ VBV
        // blockVectorV = (cho_solve((VBV.T, True), blockVectorV.T)).T
        if B is not None:
            blockVectorBV = blockVectorBV @ VBV
            // blockVectorBV = (cho_solve((VBV.T, True), blockVectorBV.T)).T
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: scipy/scipy
Commit Name: 5ded2b734290836869a549a7c0e4be7d46d4bde4
Time: 2019-08-08
Author: andrew.knyazev@ucdenver.edu
File Name: scipy/sparse/linalg/eigen/lobpcg/lobpcg.py
Class Name:
Method Name: _b_orthonormalize


Project Name: scikit-learn/scikit-learn
Commit Name: 2e8ce318c69a329f0f0dd50bc7326ed38850a372
Time: 2019-09-16
Author: g.lemaitre58@gmail.com
File Name: sklearn/externals/_lobpcg.py
Class Name:
Method Name: _b_orthonormalize


Project Name: geomstats/geomstats
Commit Name: aef7a9545116de63a66493c97836f9ea7784f5fd
Time: 2018-11-20
Author: ninamio78@gmail.com
File Name: geomstats/stiefel.py
Class Name: Stiefel
Method Name: random_uniform


Project Name: geomstats/geomstats
Commit Name: eb0904f011ed319a32f48134b9cf63f17d8bbe17
Time: 2018-11-21
Author: ninamio78@gmail.com
File Name: geomstats/stiefel.py
Class Name: Stiefel
Method Name: random_uniform