Browse files

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

  • Loading branch information...
1 parent 81aa8f2 commit aea76b85ad98c5fe89582d70344ca768b6cffec1 @rgommers rgommers committed with charris Mar 25, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 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

0 comments on commit aea76b8

Please sign in to comment.