summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorjohann.faouzi <johann.faouzi@icm-institute.org>2019-07-17 10:42:41 +0200
committerRalf Gommers <ralf.gommers@gmail.com>2019-10-18 11:31:55 +0200
commitd23a5c57460287a0ebd8e5ec1fb3d320d96ad568 (patch)
tree67432da03d133d022928d974e345b2fbfc33deed /numpy/core/numeric.py
parent49deaff355356f491725d1f304da9e4f2e30ee76 (diff)
downloadnumpy-d23a5c57460287a0ebd8e5ec1fb3d320d96ad568.tar.gz
DOC: update docstring of allclose to clarify how NaN's are handled.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 2c148712f..1e011e2e7 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -2098,9 +2098,9 @@ def allclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False):
`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.
+ NaNs are treated as equal if they are in the same place and if
+ ``equal_nan=True``. Infs are treated as equal if they are in the same
+ place and of the same sign in both arrays.
Parameters
----------
@@ -2112,7 +2112,7 @@ def allclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False):
The absolute tolerance parameter (see Notes).
equal_nan : bool
Whether to compare NaN's as equal. If True, NaN's in `a` will be
- considered equal to NaN's in `b`.
+ considered equal to NaN's in `b` in the output array.
.. versionadded:: 1.10.0