From 7d2ecb0d1511f9918a951c995988e797d2971fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Siess=C3=82?= Date: Mon, 17 Apr 2017 12:55:58 +0200 Subject: [PATCH] cast slice indices to integer --- core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core.py b/core.py index 996bd52..895d1a9 100644 --- a/core.py +++ b/core.py @@ -124,7 +124,7 @@ class Core(): sample_rate = 44100 frequencies = numpy.fft.fftfreq(len(spectrum), 1./sample_rate) - y = abs(spectrum[0:paddedSampleSize/2 - 1]) + y = abs(spectrum[0:int(paddedSampleSize/2) - 1]) # filter the noise away # y[y<80] = 0 @@ -138,6 +138,6 @@ class Core(): else: lastSpectrum = y - x = frequencies[0:paddedSampleSize/2 - 1] + x = frequencies[0:int(paddedSampleSize/2) - 1] - return lastSpectrum \ No newline at end of file + return lastSpectrum