From fcacd8893784a2e7d41a615be168b4f186d87368 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 26 Sep 2009 01:09:50 +0200 Subject: [PATCH] python/aubio/task/onset.py: use numarray, not numpy (debian #478438) --- python/aubio/task/onset.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/aubio/task/onset.py b/python/aubio/task/onset.py index 20a1282e..8466e2d5 100644 --- a/python/aubio/task/onset.py +++ b/python/aubio/task/onset.py @@ -92,7 +92,7 @@ class taskonset(task): import Gnuplot, Gnuplot.funcutils import aubio.txtfile import os.path - import numarray + from numpy import arange, array, ones from aubio.onsetcompare import onset_roc x1,y1,y1p = [],[],[] @@ -102,7 +102,7 @@ class taskonset(task): self.lenofunc = len(ofunc) self.maxofunc = max(ofunc) # onset detection function - downtime = numarray.arange(len(ofunc))*self.params.step + downtime = arange(len(ofunc))*self.params.step oplot.append(Gnuplot.Data(downtime,ofunc,with='lines',title=self.params.onsetmode)) # detected onsets @@ -111,8 +111,8 @@ class taskonset(task): x1.append(i[0]*self.params.step) y1.append(self.maxofunc) y1p.append(-self.maxofunc) - #x1 = numarray.array(onsets)*self.params.step - #y1 = self.maxofunc*numarray.ones(len(onsets)) + #x1 = array(onsets)*self.params.step + #y1 = self.maxofunc*ones(len(onsets)) if x1: oplot.append(Gnuplot.Data(x1,y1,with='impulses')) wplot.append(Gnuplot.Data(x1,y1p,with='impulses')) @@ -126,8 +126,8 @@ class taskonset(task): self.title = "" #"(no ground truth)" else: t_onsets = aubio.txtfile.read_datafile(datafile) - x2 = numarray.array(t_onsets).resize(len(t_onsets)) - y2 = self.maxofunc*numarray.ones(len(t_onsets)) + x2 = array(t_onsets).resize(len(t_onsets)) + y2 = self.maxofunc*ones(len(t_onsets)) wplot.append(Gnuplot.Data(x2,y2,with='impulses')) tol = 0.050 -- 2.26.2