Commit 12fdfc4e authored by René Fritze's avatar René Fritze Committed by René Fritze

[tests] adjust deadline/tolerance for gram_schmidt/pod

parent 09c67de0
......@@ -17,7 +17,7 @@ import pymortests.strategies as pyst
def test_gram_schmidt(vector_array):
U = vector_array[0]
# TODO assumption here masks a potential issue with the algorithm
......@@ -28,7 +28,8 @@ def test_gram_schmidt(vector_array):
onb = gram_schmidt(U, copy=True)
assert np.all(almost_equal(U, V))
assert np.allclose(, np.eye(len(onb)))
assert np.all(almost_equal(U, onb.lincomb(, rtol=1e-13))
# TODO maybe raise tolerances again
assert np.all(almost_equal(U, onb.lincomb(, atol=1e-13, rtol=1e-13))
onb2 = gram_schmidt(U, copy=False)
assert np.all(almost_equal(onb, onb2))
......@@ -4,7 +4,7 @@
import numpy as np
import pytest
from hypothesis import given, assume, reproduce_failure
from hypothesis import given, assume, reproduce_failure, settings
from hypothesis.strategies import sampled_from
from pymor.algorithms.basic import almost_equal
......@@ -16,6 +16,7 @@ from pymortests.strategies import vector_arrays
methods = ['method_of_snapshots', 'qr_svd']
@given(vector_arrays(count=1), sampled_from(methods))
def test_pod(vector_array, method):
A = vector_array[0]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment