From 549825aa3607dc3586003b061cd53169087641c2 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 9 Jan 2010 15:20:48 +0100 Subject: [PATCH] demo_filterbank.py: use fvec to create array --- interfaces/python/demo_filterbank.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/interfaces/python/demo_filterbank.py b/interfaces/python/demo_filterbank.py index 012777fb..40962bfc 100644 --- a/interfaces/python/demo_filterbank.py +++ b/interfaces/python/demo_filterbank.py @@ -1,10 +1,9 @@ -from _aubio import filterbank -from numpy import array +from aubio import filterbank, fvec f = filterbank(9, 1024) -freq_list = [40, 80, 200, 400, 800, 1600, 3200, 6400, 12800, 15000, 24000] -freqs = array(freq_list, dtype = 'float32') -f.set_triangle_bands(freqs, 48000) +freq_list = [60, 80, 200, 400, 800, 1600, 3200, 6400, 12800, 15000, 24000] +freqs = fvec(freq_list) +f.set_triangle_bands(freq_list, 48000) f.get_coeffs().T from pylab import loglog, show -- 2.26.2