summaryrefslogtreecommitdiff
path: root/numpy/testing/_private/utils.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2022-06-07 10:01:23 -0600
committerGitHub <noreply@github.com>2022-06-07 10:01:23 -0600
commit96a15a2d86eabcbbb47374d87f804404d3a08dbf (patch)
treef876377b7f1f2ccf669d46a5cfc0a134203dfedd /numpy/testing/_private/utils.py
parentfad2c4d391d6a14a01ef9fc17c45cdf011164992 (diff)
downloadnumpy-96a15a2d86eabcbbb47374d87f804404d3a08dbf.tar.gz
MAINT: Small rewrite for clarity.
Diffstat (limited to 'numpy/testing/_private/utils.py')
-rw-r--r--numpy/testing/_private/utils.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/numpy/testing/_private/utils.py b/numpy/testing/_private/utils.py
index e61e47488..e4f8b9892 100644
--- a/numpy/testing/_private/utils.py
+++ b/numpy/testing/_private/utils.py
@@ -1476,12 +1476,11 @@ def assert_allclose(actual, desired, rtol=1e-7, atol=0, equal_nan=True,
Raises an AssertionError if two objects are not equal up to desired
tolerance.
- Given two array_like objects, check that the shape is equal and all
- elements of these objects are equal (but see the Notes for the special
- handling of a scalar). An exception is raised at shape mismatch or
- conflicting values. In contrast to the standard usage in numpy, NaNs
- are compared like numbers, no assertion is raised if both objects have
- NaNs in the same positions.
+ Given two array_like objects, check that their shapes and all elements
+ are equal (but see the Notes for the special handling of a scalar). An
+ exception is raised if the shapes mismatch or any values conflict. In
+ contrast to the standard usage in numpy, NaNs are compared like numbers,
+ no assertion is raised if both objects have NaNs in the same positions.
The test is equivalent to ``allclose(actual, desired, rtol, atol)`` (note
that ``allclose`` has different default values). It compares the difference