diff options
author | M0Rf30 | 2020-02-02 19:08:21 +0100 |
---|---|---|
committer | M0Rf30 | 2020-02-02 19:08:21 +0100 |
commit | 578ae11be843a84946b3322b9d998107aa5e94bc (patch) | |
tree | d6e578d1a11bbb9f259d2936dbc8c824c0bdefef | |
parent | 8bc5b50f80a0b7229c605cb1b32e39a3a3471b02 (diff) | |
download | aur-578ae11be843a84946b3322b9d998107aa5e94bc.tar.gz |
friture: updated patch for numpy
-rw-r--r-- | numpy.patch | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/numpy.patch b/numpy.patch index 4effca3d423d..ffd90e7b3cbe 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 |