We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de63805 commit 522c296Copy full SHA for 522c296
fastplotlib/widgets/image_widget/_widget.py
@@ -929,6 +929,11 @@ def set_data(
929
for i, (new_array, current_array, subplot) in enumerate(
930
zip(new_data, self._data, self.figure)
931
):
932
+ # if the new array is the same as the existing array, skip
933
+ # this allows setting just a subset of the arrays in the ImageWidget
934
+ if new_data is self._data[i]:
935
+ continue
936
+
937
# check last two dims (x and y) to see if data shape is changing
938
old_data_shape = self._data[i].shape[-self.n_img_dims[i] :]
939
self._data[i] = new_array
0 commit comments