fix operator test

This commit is contained in:
jan 2018-01-06 13:51:42 -08:00
parent 66712efd49
commit 47dd0df8bc

View File

@ -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