diff options
author | Ralf Gommers <ralf.gommers@googlemail.com> | 2012-03-25 17:01:36 +0200 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-03-25 10:14:16 -0600 |
commit | aea76b85ad98c5fe89582d70344ca768b6cffec1 (patch) | |
tree | 870b342a9ed3580ca3d1626a2b44c1f98337f96f /numpy/core/numeric.py | |
parent | 81aa8f25ce05df3e9d27bf2beee740c1f2ce7e36 (diff) | |
download | numpy-aea76b85ad98c5fe89582d70344ca768b6cffec1.tar.gz |
DOC: allclose: document better what happens when Infs or NaNs are present.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index a9a42ea09..9a51229a1 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -1969,6 +1969,10 @@ def allclose(a, b, rtol=1.e-5, atol=1.e-8): `atol` are added together to compare against the absolute difference between `a` and `b`. + If either array contains one or more NaNs, False is returned. + Infs are treated as equal if they are in the same place and of the same + sign in both arrays. + Parameters ---------- a, b : array_like @@ -1982,8 +1986,7 @@ def allclose(a, b, rtol=1.e-5, atol=1.e-8): ------- allclose : bool Returns True if the two arrays are equal within the given - tolerance; False otherwise. If either array contains NaN, then - False is returned. + tolerance; False otherwise. See Also -------- |