summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/type_check.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py
index 1313adff7..d6e0704ad 100644
--- a/numpy/lib/type_check.py
+++ b/numpy/lib/type_check.py
@@ -424,7 +424,7 @@ def real_if_close(a,tol=100):
from numpy.core import getlimits
f = getlimits.finfo(a.dtype.type)
tol = f.eps * tol
- if _nx.allclose(a.imag, 0, atol=tol):
+ if _nx.all(_nx.absolute(a.imag) < tol):
a = a.real
return a