diff options
author | Pauli Virtanen <pav@iki.fi> | 2013-10-08 00:16:48 +0300 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2013-10-08 00:20:19 +0300 |
commit | 2fa1c9d150398cc52a2752604e24bde9e762a43c (patch) | |
tree | a2367af215a084a5010852574a1d476a79a87413 | |
parent | 727ed469beb8a53a9a270f4721147dc8032a4941 (diff) | |
download | numpy-2fa1c9d150398cc52a2752604e24bde9e762a43c.tar.gz |
TST: linalg: better rtol choice
-rw-r--r-- | numpy/linalg/tests/test_linalg.py | 6 |
1 files changed, 5 insertions, 1 deletions
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): |