a1be7bf2f0926707e25b02570c17ba373878f768,pymanopt/manifolds/psd.py,PositiveDefinite,exp,#PositiveDefinite#Any#Any#,110

Before Change


            c_inv = la.inv(c)
            e = multiexp(multiprod(multiprod(c_inv, u), multitransp(c_inv)),
                         sym=True)
            return multiprod(multiprod(c, e), multitransp(c))

    def log(self, x, y):
        c = la.cholesky(x)
        c_inv = la.inv(c)

After Change



    def exp(self, x, u):
        // TODO: Check which method is faster depending on n, k.
        x_inv_u = np.linalg.solve(x, u)
        if self._k > 1:
            e = np.zeros(np.shape(x))
            for i in range(self._k):
                e[i] = sp.linalg.expm(x_inv_u[i])
        else:
            e = sp.linalg.expm(x_inv_u)
        return multiprod(x, e)
        // This alternative implementation is sometimes faster though less
        // stable. It can return a matrix with small negative determinant.
        //    c = la.cholesky(x)
        //    c_inv = la.inv(c)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pymanopt/pymanopt
Commit Name: a1be7bf2f0926707e25b02570c17ba373878f768
Time: 2016-03-14
Author: jamiehntownsend@gmail.com
File Name: pymanopt/manifolds/psd.py
Class Name: PositiveDefinite
Method Name: exp


Project Name: reinforceio/tensorforce
Commit Name: ee950b503eeed5aca3747a4bcf2a40f624b743a0
Time: 2019-01-21
Author: alexkuhnle@t-online.de
File Name: tensorforce/core/optimizers/multi_step.py
Class Name: MultiStep
Method Name: tf_step


Project Name: pymc-devs/pymc3
Commit Name: a74007be07903fbb9852af341a99652460afd0b3
Time: 2017-01-20
Author: adrian.seyboldt@gmail.com
File Name: pymc3/step_methods/hmc/quadpotential.py
Class Name: QuadPotential_Inv
Method Name: velocity