Skip to content

Commit

Permalink
DOC: allclose: document better what happens when Infs or NaNs are pre…
Browse files Browse the repository at this point in the history
…sent.
  • Loading branch information
rgommers authored and charris committed Mar 25, 2012
1 parent 81aa8f2 commit aea76b8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions numpy/core/numeric.py
Expand Up @@ -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
Expand All @@ -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
--------
Expand Down

0 comments on commit aea76b8

Please sign in to comment.