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
Just spent a frustrating amount of time debugging what ended up being an issue with passing an unsupported data type to the vispy image node. there was a vague warning in the logs that I overlooked:
/Users/talley/dev/self/ndv/src/ndv/views/_vispy/_array_canvas.py:485: UserWarning: Downcasting integer data to uint16.
data = _downcast(data)
but the phenotype was that, even though I was passing in new data, the viewer stayed static. Long story short, we need to do comprehensive basic testing to ensure that all possible numpy data types work and/or are cast as needed for the canvas backend
The text was updated successfully, but these errors were encountered:
ok, the stupid stupid answer was that we downcast data when creating the image texture, but not when updating:
defset_data(self, data: np.ndarray) ->None:
ifnotdata.ndim==self._ndim:
warnings.warn(
f"Got wrong number of dimensions ({data.ndim}) for vispy "f"visual of type {type(self._visual)}.",
stacklevel=2,
)
returnself._visual.set_data(_downcast(data)) # <------------------------- need downcast here
Just spent a frustrating amount of time debugging what ended up being an issue with passing an unsupported data type to the vispy image node. there was a vague warning in the logs that I overlooked:
but the phenotype was that, even though I was passing in new data, the viewer stayed static. Long story short, we need to do comprehensive basic testing to ensure that all possible numpy data types work and/or are cast as needed for the canvas backend
The text was updated successfully, but these errors were encountered: