From fd9f706b90d5c64d9c7a6903e62724c251da012f Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Fri, 5 Aug 2016 10:01:06 +0200 Subject: Round to integers in plot_input and spectrogram examples See #21. --- examples/plot_input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/plot_input.py') diff --git a/examples/plot_input.py b/examples/plot_input.py index 26212e5..1210ba3 100755 --- a/examples/plot_input.py +++ b/examples/plot_input.py @@ -86,7 +86,7 @@ try: device_info = sd.query_devices(args.device, 'input') args.samplerate = device_info['default_samplerate'] - length = np.ceil(args.window * args.samplerate / (1000 * args.downsample)) + length = int(args.window * args.samplerate / (1000 * args.downsample)) plotdata = np.zeros((length, len(args.channels))) fig, ax = plt.subplots() -- cgit v1.2.3