Skip to content

Commit 4df7866

Browse files
author
Spencer Hill
authored
DOC allclose doesn't require matching shapes
Closes numpy#5654
1 parent 9474f03 commit 4df7866

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎numpy/core/numeric.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2448,6 +2448,10 @@ def allclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False):
24482448
The above equation is not symmetric in `a` and `b`, so that
24492449
`allclose(a, b)` might be different from `allclose(b, a)` in
24502450
some rare cases.
2451+
2452+
The comparison of `a` and `b` includes standard broadcasting,
2453+
which means that `a` and `b` need not have the same shape in order for
2454+
allclose(a, b) to evaluate to True. (The same is true for `np.equals`.)
24512455
24522456
Examples
24532457
--------

0 commit comments

Comments
 (0)