cdc013766a961e645e6e0e5284d18f9f2153b933,geomstats/hyperbolic_space.py,HyperbolicMetric,log,#HyperbolicMetric#Any#Any#,231

Before Change


        angle = gs.array(angle)
        if angle.ndim == 0:
            angle = gs.to_ndarray(angle, to_ndim=1, axis=0)
        angle = gs.to_ndarray(angle, to_ndim=2)

        mask_0 = gs.isclose(angle, 0)
        mask_else = ~mask_0

After Change


        coef_1[mask_else] = angle[mask_else] / gs.sinh(angle[mask_else])
        coef_2[mask_else] = angle[mask_else] / gs.tanh(angle[mask_else])

        log = (gs.einsum("...,...j->...j", coef_1, point)
               - gs.einsum("...,...j->...j", coef_2, base_point))
        return log

    def dist(self, point_a, point_b):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: geomstats/geomstats
Commit Name: cdc013766a961e645e6e0e5284d18f9f2153b933
Time: 2018-05-09
Author: ninamio78@gmail.com
File Name: geomstats/hyperbolic_space.py
Class Name: HyperbolicMetric
Method Name: log


Project Name: geomstats/geomstats
Commit Name: 14fd77cdb57fda801252e7768e999f4f7154ad21
Time: 2020-04-23
Author: gerald@pop-os.localdomain
File Name: examples/learning_graph_structured_data_h2.py
Class Name:
Method Name: loss


Project Name: geomstats/geomstats
Commit Name: 3649662e14d5858ea5e86b18540bd52bcafbb4c6
Time: 2020-01-24
Author: nicolas.guigui@inria.fr
File Name: geomstats/geometry/connection.py
Class Name: Connection
Method Name: geodesic_equation


Project Name: geomstats/geomstats
Commit Name: 61a9bbf31b58051db923cd437be809b74ebafb0a
Time: 2020-01-28
Author: nicolas.guigui@inria.fr
File Name: geomstats/geometry/connection.py
Class Name: Connection
Method Name: geodesic_equation