From bb3cea7fe800cd5375de5351a72e0944dc86861f Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Fri, 14 Nov 2025 14:19:37 +0100 Subject: [PATCH] fix(waveform): async_readback can accept 0D data --- bec_widgets/widgets/plots/waveform/waveform.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bec_widgets/widgets/plots/waveform/waveform.py b/bec_widgets/widgets/plots/waveform/waveform.py index f62183d3..91b18e1c 100644 --- a/bec_widgets/widgets/plots/waveform/waveform.py +++ b/bec_widgets/widgets/plots/waveform/waveform.py @@ -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: