summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
authorEric O. LEBIGOT (EOL) <eric.lebigot@normalesup.org>2014-12-17 16:30:02 +0800
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-12-24 13:38:13 +0100
commit3b6217f3799f85686c1ae87bbdc5cb10ad4585ec (patch)
treee343b4d7c3b66d620572fd719d89bc55b8370ad7 /numpy/testing/utils.py
parentfee4bcbaf0eb1c7d5c5a0eadc2011be00370b335 (diff)
downloadnumpy-3b6217f3799f85686c1ae87bbdc5cb10ad4585ec.tar.gz
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))`).
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r--numpy/testing/utils.py2
1 files changed, 1 insertions, 1 deletions
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
--------