diff --git a/tests/test_trace.py b/tests/test_trace.py index 30ccd20..4eacf62 100644 --- a/tests/test_trace.py +++ b/tests/test_trace.py @@ -121,28 +121,25 @@ def test_trace_mf(): tr_est = hutch(A, fun="identity", maxiter=100, num_threads=1, seed = 5) tr_true = A.trace() assert np.isclose(tr_est, tr_true, atol=tr_true*0.05) - - ## TODO tr_est, info = hutch(A, fun=lambda x: x, maxiter=100, seed=5, num_threads=1, info=True) assert np.isclose(tr_est, tr_true, atol=tr_true*0.05) - for s in range(15000): - est, info = hutch(A, fun="identity", deg=2, maxiter=200, num_threads=1, seed=591, info=True) - assert not np.isnan(est) - for s in range(15000): - est, info = hutch(A, fun="identity", deg=20, maxiter=200, num_threads=8, seed=-1, info=True) - assert not np.isnan(est) - - from primate.operator import matrix_function - M = matrix_function(A, fun="identity", deg=20) - for s in range(15000): - v0 = np.random.choice([-1, 1], size=M.shape[0]) - assert not np.isnan(M.quad(v0)) - M.krylov_basis - M.ncv - M.deg - M._alpha - M._beta - M.matvec(-v0) + + ## TODO + # tr_est, info = hutch(A, fun=lambda x: x, maxiter=100, seed=5, num_threads=1, info=True) + # assert np.isclose(tr_est, tr_true, atol=tr_true*0.05) + # for s in range(15000): + # est, info = hutch(A, fun="identity", deg=2, maxiter=200, num_threads=1, seed=591, info=True) + # assert not np.isnan(est) + # for s in range(15000): + # est, info = hutch(A, fun="identity", deg=20, maxiter=200, num_threads=8, seed=-1, info=True) + # assert not np.isnan(est) + + # from primate.operator import matrix_function + # M = matrix_function(A, fun="identity", deg=20) + # for s in range(15000): + # v0 = np.random.choice([-1, 1], size=M.shape[0]) + # assert not np.isnan(M.quad(v0)) + # from primate.diagonalize import lanczos # lanczos(A, v0=v0, rtol=M.rtol, deg=M.deg, orth=M.orth)