summarylogtreecommitdiffstats
path: root/numpy.patch
diff options
context:
space:
mode:
Diffstat (limited to 'numpy.patch')
-rw-r--r--numpy.patch24
1 files changed, 21 insertions, 3 deletions
diff --git a/numpy.patch b/numpy.patch
index 4effca3d423..ffd90e7b3cb 100644
--- a/numpy.patch
+++ b/numpy.patch
@@ -1,13 +1,31 @@
+From e5c945a13d6f1d9de1cbb88c2b916fdb0401a5be Mon Sep 17 00:00:00 2001
+From: Joost Timmerman <joost@tmmrman.nl>
+Date: Sat, 1 Feb 2020 22:52:53 +0100
+Subject: [PATCH] Use floor division to get integer values
+
+This resolves an error
+
+ File "/usr/bin/friture", line 10, in <module>
+ main()
+ ...
+ File "/usr/lib/python3.8/site-packages/friture/audioproc.py", line 109, in update_freq_cache
+ self.freq = linspace(0, SAMPLING_RATE / (2 * self.decimation), self.fft_size / (2 * self.decimation) + 1)
+ ...
+TypeError: object of type <class 'float'> cannot be safely interpreted as an integer.
+---
+ friture/audioproc.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
diff --git a/friture/audioproc.py b/friture/audioproc.py
-index dfce022..4c70a6e 100644
+index dfce022..da36006 100644
--- a/friture/audioproc.py
+++ b/friture/audioproc.py
-@@ -106,7 +106,7 @@ class audioproc():
+@@ -106,7 +106,7 @@ def update_window(self):
def update_freq_cache(self):
if len(self.freq) != self.fft_size / (2 * self.decimation) + 1:
self.logger.info("audioproc: updating self.freq cache")
- self.freq = linspace(0, SAMPLING_RATE / (2 * self.decimation), self.fft_size / (2 * self.decimation) + 1)
-+ self.freq = linspace(0, SAMPLING_RATE / (2 * self.decimation), int(self.fft_size / (2 * self.decimation) + 1))
++ self.freq = linspace(0, SAMPLING_RATE // (2 * self.decimation), self.fft_size // (2 * self.decimation) + 1)
# compute psychoacoustic weighting. See http://en.wikipedia.org/wiki/A-weighting
f = self.freq