31d8076c8dd31c28054e820571ef38234950e101,geomstats/spd_matrices_space.py,,group_log,#Any#,76

Before Change



    diag_log = np.zeros((n_sym_mats, mat_dim, mat_dim))
    for i in range(n_sym_mats):
        diag_log[i] = np.diag(np.log(eigenvalues[i]))

    log = np.matmul(diag_log, np.transpose(vectors, axes=(0, 2, 1)))
    log = np.matmul(vectors, log)
    return log

After Change


    log_eigenvalues = np.log(eigenvalues)

    aux = np.einsum("ijk,ik->ijk", vectors, log_eigenvalues)
    log_mat = np.einsum("ijk,ilk->ijl", aux, vectors)

    log_mat = vectorization.to_ndarray(log_mat, to_ndim=3)
    return log_mat


class SPDMatricesSpace(EmbeddedManifold):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: geomstats/geomstats
Commit Name: 31d8076c8dd31c28054e820571ef38234950e101
Time: 2018-05-08
Author: ninamio78@gmail.com
File Name: geomstats/spd_matrices_space.py
Class Name:
Method Name: group_log


Project Name: geomstats/geomstats
Commit Name: ca7b264f69db393e3d1c704a20b4f22047d1998f
Time: 2018-05-08
Author: ninamio78@gmail.com
File Name: geomstats/spd_matrices_space.py
Class Name:
Method Name: group_exp


Project Name: prody/ProDy
Commit Name: 578af54826ecbdcd307cb470c96eee234d5124d4
Time: 2020-05-13
Author: jamesmkrieger@gmail.com
File Name: prody/dynamics/compare.py
Class Name:
Method Name: calcOverlap