Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1fa184b

Browse files
committedJun 11, 2025·
TST: Fix runtime error checking NaN input to format_cursor_data
1 parent c44ae00 commit 1fa184b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎lib/matplotlib/tests/test_image.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,8 @@ def test_image_cursor_formatting():
11801180
assert im.format_cursor_data(data) == '[0]'
11811181

11821182
data = np.nan
1183-
assert im.format_cursor_data(data) == '[nan]'
1183+
with np.errstate(invalid='ignore'):
1184+
assert im.format_cursor_data(data) == '[nan]'
11841185

11851186

11861187
@check_figures_equal(extensions=['png', 'pdf', 'svg'])

0 commit comments

Comments
 (0)
Please sign in to comment.