diff options
author | Simon Surland Andersen <syrlander98@gmail.com> | 2022-02-08 14:43:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-08 07:43:36 -0600 |
commit | f69ddd7111048111a7e486a2d7d008bd231af33d (patch) | |
tree | cc3e7ca5e30ff8b6668a7311be8eb24a12ff7d33 /numpy/testing/_private/utils.py | |
parent | 4b3ddd74610d1975e0d0eb9c32df2a2d54c8dafd (diff) | |
download | numpy-f69ddd7111048111a7e486a2d7d008bd231af33d.tar.gz |
ENH: Suppress over-/underflow RuntimeWarning in assert_array_equal (#21003)
* TST: Test suppression of asset_array_equal RuntimeWarning See #18992
* ENH: Suppress over-/underflow warnings on asset_array_equal - Closes #18992
* MAINT: Resolve linting issues of prior commit
* MAINT: Simplified ignore and test case of asset_array_equal
* MAINT: Removed unused import in test_utils.py
Diffstat (limited to 'numpy/testing/_private/utils.py')
-rw-r--r-- | numpy/testing/_private/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/testing/_private/utils.py b/numpy/testing/_private/utils.py index 2c71e45bd..80a6fdd10 100644 --- a/numpy/testing/_private/utils.py +++ b/numpy/testing/_private/utils.py @@ -810,7 +810,7 @@ def assert_array_compare(comparison, x, y, err_msg='', verbose=True, header='', 'Mismatched elements: {} / {} ({:.3g}%)'.format( n_mismatch, n_elements, percent_mismatch)] - with errstate(invalid='ignore', divide='ignore'): + with errstate(all='ignore'): # ignore errors for non-numeric types with contextlib.suppress(TypeError): error = abs(x - y) |