c4b2984168c60f7dd22053ad712228236d817916,geomstats/geometry/spd_matrices.py,SPDMatrices,belongs,#SPDMatrices#Any#Any#,24
Before Change
def belongs(self, mat, tolerance=TOLERANCE):
Check if a matrix belongs to the manifold of SPD matrices.
mat = gs.to_ndarray(mat, to_ndim=3)
n_mats, mat_dim, _ = mat.shape
mask_is_symmetric = self.embedding_manifold.is_symmetric(
mat, tolerance=tolerance)
mask_is_invertible = self.embedding_manifold.belongs(mat)
belongs = mask_is_symmetric & mask_is_invertible
belongs = gs.to_ndarray(belongs, to_ndim=1)
belongs = gs.to_ndarray(belongs, to_ndim=2, axis=1)
return belongs
def vector_from_symmetric_matrix(self, mat):
Convert the symmetric part of a symmetric matrix into a vector.
mat = gs.to_ndarray(mat, to_ndim=3)
After Change
Check if a matrix belongs to the manifold of
symmetric positive definite matrices.
return Matrices.is_symmetric(mat)
def vector_from_symmetric_matrix(self, mat):
Convert the symmetric part of a symmetric matrix into a vector.
mat = gs.to_ndarray(mat, to_ndim=3)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
Instances Project Name: geomstats/geomstats
Commit Name: c4b2984168c60f7dd22053ad712228236d817916
Time: 2020-01-21
Author: opeltre@gmail.com
File Name: geomstats/geometry/spd_matrices.py
Class Name: SPDMatrices
Method Name: belongs
Project Name: geomstats/geomstats
Commit Name: 37a2d7f9e9b2343689343fb9fd23399e03e1127b
Time: 2020-01-21
Author: opeltre@gmail.com
File Name: geomstats/geometry/spd_matrices.py
Class Name: SPDMatrices
Method Name: belongs
Project Name: geomstats/geomstats
Commit Name: f6f5b44e3bc61433862a88ac1f47201f5feb3142
Time: 2020-01-15
Author: thomas.l.p.gerald@gmail.com
File Name: geomstats/geometry/hyperbolic_space.py
Class Name: HyperbolicSpace
Method Name: intrinsic_to_extrinsic_coords