bc965b86fac1a028ecc18c0e3dfd98c08ae57f9a,geomstats/special_orthogonal_group.py,SpecialOrthogonalGroup,quaternion_from_rotation_vector,#SpecialOrthogonalGroup#Any#,647

Before Change


        rotation_axis[mask_not_0] = rot_vec[mask_not_0] / angle[mask_not_0]

        n_quaternions, _ = rot_vec.shape
        quaternion = gs.zeros((n_quaternions, 4))
        quaternion[:, :1] = gs.cos(angle / 2)
        quaternion[:, 1:] = gs.sin(angle / 2) * rotation_axis[:]

        return quaternion

After Change


        rotation_axis = gs.divide(rot_vec,
                                  angle *
                                  gs.cast(mask_not_0, gs.float32) +
                                  gs.cast(mask_0, gs.float32))

        quaternion = gs.concatenate((gs.cos(angle / 2),
                        gs.sin(angle / 2) * rotation_axis[:]), axis=1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: geomstats/geomstats
Commit Name: bc965b86fac1a028ecc18c0e3dfd98c08ae57f9a
Time: 2018-11-07
Author: null
File Name: geomstats/special_orthogonal_group.py
Class Name: SpecialOrthogonalGroup
Method Name: quaternion_from_rotation_vector


Project Name: geomstats/geomstats
Commit Name: 236c30bae48e43f7c91434b9a18d1d97579c98ae
Time: 2018-09-27
Author: ninamio78@gmail.com
File Name: geomstats/special_orthogonal_group.py
Class Name:
Method Name: get_mask_i_float


Project Name: deepchem/deepchem
Commit Name: 71bc15c9bdf7be38275c0bf4b3d51afd28620930
Time: 2020-04-03
Author: bharath@Bharaths-MBP.zyxel.com
File Name: deepchem/models/layers.py
Class Name: DAGLayer
Method Name: call