Skip to content

Commit

Permalink
MAINT: fix doc build issue; add new_feature.rst
Browse files Browse the repository at this point in the history
[skip actions] [skip cirrus] [skip azp]
  • Loading branch information
mdhaber committed Sep 11, 2023
1 parent 97ac89d commit a42827c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions doc/release/upcoming_changes/24680.new_feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
``strict`` option for `testing.assert_allclose`
-----------------------------------------------
The ``strict`` option is now available for `testing.assert_allclose`.
Setting ``strict=True`` will disable the broadcasting behaviour for scalars
and ensure that input arrays have the same data type.
4 changes: 2 additions & 2 deletions numpy/testing/_private/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ def assert_allclose(actual, desired, rtol=1e-7, atol=0, equal_nan=True,
...
AssertionError:
Not equal to tolerance rtol=1e-07, atol=1e-15
<BLANKLINE>
(shapes (3,), () mismatch)
x: array([ 0.000000e+00, 1.224647e-16, -2.449294e-16])
y: array(0)
Expand All @@ -1526,7 +1526,7 @@ def assert_allclose(actual, desired, rtol=1e-7, atol=0, equal_nan=True,
...
AssertionError:
Not equal to tolerance rtol=1e-07, atol=1e-15
<BLANKLINE>
(dtypes float64, float32 mismatch)
x: array([ 0.000000e+00, 1.224647e-16, -2.449294e-16])
y: array([0., 0., 0.], dtype=float32)
Expand Down

0 comments on commit a42827c

Please sign in to comment.