Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

DOC: allclose: document better what happens when Infs or NaNs are pre…

  • Loading branch information...
commit aea76b85ad98c5fe89582d70344ca768b6cffec1 1 parent 81aa8f2
@rgommers rgommers authored charris committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 numpy/core/
7 numpy/core/
@@ -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.
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
Please sign in to comment.
Something went wrong with that request. Please try again.