Skip to content

Commit e8e3aab

Browse files
committed
use pseudo-inverse
1 parent 0659ee7 commit e8e3aab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spectral/algorithms/algorithms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,9 +745,9 @@ def cov(self, C):
745745

746746
@property
747747
def inv_cov(self):
748-
'''Property method returning the inverse of the covariance matrix.'''
748+
'''Property method returning the pseudo-inverse of the covariance matrix.'''
749749
if self._inv_cov is None:
750-
self._inv_cov = np.linalg.inv(self._cov)
750+
self._inv_cov = np.linalg.pinv(self._cov)
751751
return self._inv_cov
752752

753753
def reset_derived_stats(self):

0 commit comments

Comments
 (0)