1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-04 16:02:51 +01:00

fix(waveform): async_readback can accept 0D data

This commit is contained in:
2025-11-14 14:19:37 +01:00
committed by Jan Wyzula
parent 3c6aa8e138
commit bb3cea7fe8

View File

@@ -1628,6 +1628,9 @@ class Waveform(PlotBase):
continue
# Ensure we have numpy array for data_plot_y
data_plot_y = np.asarray(data_plot_y)
if data_plot_y.ndim == 0:
# Convert scalars/0d arrays to 1d so len() and stacking work
data_plot_y = data_plot_y.reshape(1)
# Add
if instruction == "add":
if len(max_shape) > 1: