77e56feb2a220db76da79613e346ffc5110061c0,geomstats/backend/numpy_linalg.py,,logm,#Any#,33

Before Change


    if (new_x - np.transpose(new_x, axes=(0, 2, 1)) == 0).all():
        eigvals, eigvecs = np.linalg.eigh(new_x)
        if (eigvals > 0).all():
            eigvals = np.vectorize(np.diag, signature="(n)->(n,n)")(np.log(eigvals))
            transp_eigvecs = np.transpose(eigvecs, axes=(0, 2, 1))
            result = np.matmul(eigvecs, eigvals)
            result = np.matmul(result, transp_eigvecs)
        else:

After Change


    new_x = to_ndarray(x, to_ndim=3)
    if (new_x - np.transpose(new_x, axes=(0, 2, 1)) == 0).all():
        eigvals, eigvecs = np.linalg.eigh(new_x)
        eigvals = np.log(eigvals)
        if (eigvals > 0).all():
            eigvals = np.vectorize(np.diag, signature="(n)->(n,n)")(eigvals)
            transp_eigvecs = np.transpose(eigvecs, axes=(0, 2, 1))
            result = np.matmul(eigvecs, eigvals)
            result = np.matmul(result, transp_eigvecs)
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: geomstats/geomstats
Commit Name: 77e56feb2a220db76da79613e346ffc5110061c0
Time: 2020-01-16
Author: yann.thanwerdas@gmail.com
File Name: geomstats/backend/numpy_linalg.py
Class Name:
Method Name: logm


Project Name: geomstats/geomstats
Commit Name: 9e001d1ff93ee69f8d4dc461c2fafad2b5c65cad
Time: 2020-01-16
Author: yann.thanwerdas@gmail.com
File Name: geomstats/backend/numpy_linalg.py
Class Name:
Method Name: logm


Project Name: geomstats/geomstats
Commit Name: 77e56feb2a220db76da79613e346ffc5110061c0
Time: 2020-01-16
Author: yann.thanwerdas@gmail.com
File Name: geomstats/backend/numpy_linalg.py
Class Name:
Method Name: powerm


Project Name: geomstats/geomstats
Commit Name: 9e001d1ff93ee69f8d4dc461c2fafad2b5c65cad
Time: 2020-01-16
Author: yann.thanwerdas@gmail.com
File Name: geomstats/backend/numpy_linalg.py
Class Name:
Method Name: powerm