summaryrefslogtreecommitdiff
path: root/numpy/linalg/tests/test_linalg.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/linalg/tests/test_linalg.py')
-rw-r--r--numpy/linalg/tests/test_linalg.py6
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):