summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r--numpy/testing/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
index 7009d532c..708293a35 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -1109,7 +1109,7 @@ def assert_array_almost_equal_nulp(x, y, nulp=1):
if not np.all(np.abs(x-y) <= ref):
max_nulp = np.max(nulp_diff(x, y))
raise AssertionError("X and Y are not equal to %d ULP "\
- "(max is %d)" % (nulp, max_nulp))
+ "(max is %g)" % (nulp, max_nulp))
def assert_array_max_ulp(a, b, maxulp=1, dtype=None):
"""Given two arrays a and b, check that every item differs in at most N
@@ -1117,7 +1117,7 @@ def assert_array_max_ulp(a, b, maxulp=1, dtype=None):
import numpy as np
ret = nulp_diff(a, b, dtype)
if not np.all(ret <= maxulp):
- raise AssertionError("Arrays are not almost equal up to %d ULP" % \
+ raise AssertionError("Arrays are not almost equal up to %g ULP" % \
maxulp)
return ret