2d199a2b947146cb788b6c81feb83a1f6bd196b2,geomstats/special_orthogonal_group.py,SpecialOrthogonalGroup,regularize_tangent_vec_at_identity,#SpecialOrthogonalGroup#Any#Any#Any#,167
Before Change
mask_else = ~mask_0
mask_0 = gs.squeeze(mask_0, axis=1)
mask_else = gs.squeeze(mask_else, axis=1)
coef = gs.empty_like(tangent_vec_metric_norm)
regularized_vec = tangent_vec
regularized_vec[mask_0] = tangent_vec[mask_0]
coef[mask_else] = (tangent_vec_metric_norm[mask_else]
/ tangent_vec_canonical_norm[mask_else])
regularized_vec[mask_else] = self.regularize(
coef[mask_else] * tangent_vec[mask_else])
regularized_vec[mask_else] = (regularized_vec[mask_else]
After Change
coef += mask_else_float * (
tangent_vec_metric_norm
/ tangent_vec_canonical_norm)
regularized_vec += mask_else_float * self.regularize(
coef * tangent_vec)
// This avois dividing by 0.
coef += mask_0_float * 1.
regularized_vec = mask_else_float * (
regularized_vec / coef)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: geomstats/geomstats
Commit Name: 2d199a2b947146cb788b6c81feb83a1f6bd196b2
Time: 2018-09-27
Author: ninamio78@gmail.com
File Name: geomstats/special_orthogonal_group.py
Class Name: SpecialOrthogonalGroup
Method Name: regularize_tangent_vec_at_identity
Project Name: geomstats/geomstats
Commit Name: 2d199a2b947146cb788b6c81feb83a1f6bd196b2
Time: 2018-09-27
Author: ninamio78@gmail.com
File Name: geomstats/special_orthogonal_group.py
Class Name: SpecialOrthogonalGroup
Method Name: regularize_tangent_vec_at_identity
Project Name: geomstats/geomstats
Commit Name: dae22e6fa804158483d32755d6866c451737984a
Time: 2020-02-13
Author: niklas.koep@gmail.com
File Name: geomstats/geometry/product_manifold.py
Class Name: ProductManifold
Method Name: regularize
Project Name: geomstats/geomstats
Commit Name: 276d53ecd49afcf7d055a9c55ac51e6eaecc06e7
Time: 2020-02-17
Author: yann.cabanes@u-bordeaux.fr
File Name: geomstats/geometry/product_manifold.py
Class Name: ProductManifold
Method Name: regularize