From 2fa1c9d150398cc52a2752604e24bde9e762a43c Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Tue, 8 Oct 2013 00:16:48 +0300 Subject: TST: linalg: better rtol choice --- numpy/linalg/tests/test_linalg.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'numpy/linalg/tests') diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py index 7eb82ff64..aefb61b14 100644 --- a/numpy/linalg/tests/test_linalg.py +++ b/numpy/linalg/tests/test_linalg.py @@ -49,7 +49,11 @@ def get_complex_dtype(dtype): csingle: csingle, cdouble: cdouble}[dtype] def get_rtol(dtype): - return 0.1 * np.sqrt(np.finfo(dtype).eps) + # Choose a safe rtol + if dtype in (np.single, csingle): + return 1e-5 + else: + return 1e-11 class LinalgCase(object): def __init__(self, name, a, b, exception_cls=None): -- cgit v1.2.1