From 2a61adef0a97bea2f252e75a7f482de3da7d3c74 Mon Sep 17 00:00:00 2001 From: Chengyu Liu Date: Fri, 31 Mar 2023 10:33:34 +0900 Subject: [PATCH] MAINT: fix float input for number of samples --- examples/demo/advanced/spec_waterfall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo/advanced/spec_waterfall.py b/examples/demo/advanced/spec_waterfall.py index f161ad7b0..5dd6d7d57 100644 --- a/examples/demo/advanced/spec_waterfall.py +++ b/examples/demo/advanced/spec_waterfall.py @@ -100,7 +100,7 @@ def map_screen(self, data_array, data_offset=None): def _create_plot_component(obj): # Setup the spectrum plot - frequencies = linspace(0.0, float(SAMPLING_RATE) / 2, num=NUM_SAMPLES / 2) + frequencies = linspace(0.0, float(SAMPLING_RATE) / 2, num=NUM_SAMPLES // 2) obj.spectrum_data = ArrayPlotData(frequency=frequencies) empty_amplitude = zeros(NUM_SAMPLES // 2) obj.spectrum_data.set_data("amplitude", empty_amplitude)