| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Without this fix, hovering the mouse over a nan pixel in an imshow() would result in `Warning: converting a masked element to nan.` and then `ValueError: cannot convert float NaN to integer`. Fix that. The format_cursor_data test doesn't explicitly check the return value of get_cursor_data anymore because np.ma.masked is returned for nan inputs (this is expected from the general approach for handling invalid data); checking that format_cursor_data gives the right string is sufficient.
…145-on-v3.5.x Backport PR #21145 on branch v3.5.x (Fix format_cursor_data with nans.)
Fix format_cursor_data with nans.
Fix format_cursor_data with nans.
| Back | FazBrowse Home | New Git URL |
Without this fix, hovering the mouse over a nan pixel in an imshow()
would result in Warning: converting a masked element to nan. and then
ValueError: cannot convert float NaN to integer. Fix that.
The format_cursor_data test doesn't explicitly check the return value
of get_cursor_data anymore because np.ma.masked is returned for nan
inputs (this is expected from the general approach for handling invalid
data); checking that format_cursor_data gives the right string is
sufficient.
Regression coming from #20949.
PR Summary
PR Checklist