fix operator test
This commit is contained in:
parent
66712efd49
commit
47dd0df8bc
@ -53,7 +53,7 @@ def rayleigh_quotient_iteration(operator: sparse.spmatrix or spalg.LinearOperato
|
|||||||
:return: (eigenvalue, eigenvector)
|
:return: (eigenvalue, eigenvector)
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
_test = operator - sparse.eye(operator.shape)
|
_test = operator - sparse.eye(operator.shape[0])
|
||||||
shift = lambda eigval: eigval * sparse.eye(operator.shape[0])
|
shift = lambda eigval: eigval * sparse.eye(operator.shape[0])
|
||||||
if solver is None:
|
if solver is None:
|
||||||
solver = spalg.spsolve
|
solver = spalg.spsolve
|
||||||
|
Loading…
Reference in New Issue
Block a user