8000 ENH: add parameter `strict` to `assert_allclose` by mdhaber · Pull Request #24680 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: add parameter strict to assert_allclose #24680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
DOC: fix intersphinx reference; replace "pi" with symbol
[skip actions] [skip cirrus] [skip azp]
  • Loading branch information
mdhaber authored Sep 21, 2023
commit 9dc586592dececf9818910fc19859506e4c98ee5
4 changes: 2 additions & 2 deletions numpy/testing/_private/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1499,8 +1499,8 @@ def assert_allclose(actual, desired, rtol=1e-7, atol=0, equal_nan=True,
>>> np.testing.assert_allclose(x, y, rtol=1e-5, atol=0)

As mentioned in the Notes section, `assert_allclose` has special
handling for scalars. Here, the test checks that the value of `np.sin`
is nearly zero at integer multiples of pi.
handling for scalars. Here, the test checks that the value of `numpy.sin`
is nearly zero at integer multiples of π.

>>> x = np.arange(3) * np.pi
>>> np.testing.assert_allclose(np.sin(x), 0, atol=1e-15)
Expand Down
0