Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions fastplotlib/widgets/image_widget/_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,11 @@ def set_data(
for i, (new_array, current_array, subplot) in enumerate(
zip(new_data, self._data, self.figure)
):
# if the new array is the same as the existing array, skip
# this allows setting just a subset of the arrays in the ImageWidget
if new_data is self._data[i]:
continue

# check last two dims (x and y) to see if data shape is changing
old_data_shape = self._data[i].shape[-self.n_img_dims[i] :]
self._data[i] = new_array
Expand Down