From 3b6217f3799f85686c1ae87bbdc5cb10ad4585ec Mon Sep 17 00:00:00 2001 From: "Eric O. LEBIGOT (EOL)" Date: Wed, 17 Dec 2014 16:30:02 +0800 Subject: DOC: Fixed incorrect assert_array_almost_equal_nulp documentation The `max()` function previously used does not work with two array-like. `maximum()` does, and is what is essentially used in the code (`ref = nulp * np.spacing(np.where(ax > ay, ax, ay))`). --- numpy/testing/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/testing/utils.py') diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index ddf21e2bc..d93fbd630 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -1323,7 +1323,7 @@ def assert_array_almost_equal_nulp(x, y, nulp=1): ----- An assertion is raised if the following condition is not met:: - abs(x - y) <= nulps * spacing(max(abs(x), abs(y))) + abs(x - y) <= nulps * spacing(maximum(abs(x), abs(y))) Examples -------- -- cgit v1.2.1