You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pretty sure this is due to the numpy minor version release on 2022/12/18. I assume the new version is stricter about casts from nan (or something similar to that).
We can prevent use of that version temporarily to make tests pass again, or probably better fix the tests that now fail.
I see we explicitly set the extent for all empty non-image layers (e.g. see Points._data_extent), to be full of nans. That's intuitively correct to me because if there's no data, then the extent isn't really defined, so I prefer nans over zeros.
But this breaks down with Layer.corner_pixels, since that is defined in data space and has integer values. That attribute is only really useful (inside napari) for 2D visualization of multi-scale image layers, but we also try to keep it up-to-date in general (which is where this warning is coming from) and it is part of the public/documented API. When there is no data and the extent is undefined, we'll eventually try to set a nan on an int array, so this warning is rightly issued.
I think the best quick fix is to check for an all-nan extent in Layer._update_draw, and just set corner pixels to zeros in this case. We could ignore the warning with a context manager, but that might hide more real failures. I think the best long term fix is to find some way to remove Layer.corner_pixels and capture it in slice input/requests instead.
@sofroniewn : as best as I can work out, you decided on nans in #1360 . That was over 2 years ago, but curious if you remember any thoughts here?
The Comprehensive Test workflow failed on 2022-12-20 18:07 UTC
The most recent failing test was on macos-latest py3.9
with commit: 59cd8a5
Full run: https://github.com/napari/napari/actions/runs/3742847471
(This post will be updated if another test fails, as long as this issue remains open.)
The text was updated successfully, but these errors were encountered: