Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 385e23e

Browse files
committed
updated test for im.format_cursor_data
The previous version of this test passed for numpy 1.x but not for 2.x. This should pass for both
1 parent 1e60973 commit 385e23e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/tests/test_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ def test_image_cursor_formatting():
11361136
# However, a value of nan will be masked by `cbook.safe_masked_invalid(data)`
11371137
# called by `image._ImageBase._normalize_image_array(data)`
11381138
# The test is therefore changed to:
1139-
data = cbook.safe_masked_invalid(np.nan)
1139+
data = cbook.safe_masked_invalid(np.array(np.nan))
11401140
assert im.format_cursor_data(data) == '[]'
11411141

11421142

0 commit comments

Comments
 (0)