History

python: finish getting rid of numarray

Paul Brossier committed 17 years ago

Commit e7a77941 parent 342e3807 files · +8 −11Browse files

Showing the changes to python (7 of 7 files). Show all

Unified · Split

7 files
  1. python/aubio/onsetcompare.py +1 −1
  2. python/aubio/plot/notes.py +4 −4
  3. python/aubiodiffs-onset +0 −2
  4. python/aubiofilter-notes +1 −1
  5. python/aubionotes +0 −1
  6. python/aubioplot-notes +1 −1
  7. python/aubioweb.py +1 −1
python/aubio/onsetcompare.py+1−1
@@ -106,7 +106,7 @@ def onset_rocloc(ltru, lexp, eps): · 105 unmodified lines
106 return orig, missed, merged, expc, bad, doubled, l, labs106 return orig, missed, merged, expc, bad, doubled, l, labs
107 107
108def notes_roc (la, lb, eps):108def notes_roc (la, lb, eps):
109 from numarray import transpose, add, resize 109 from numpy import transpose, add, resize
110 """ creates a matrix of size len(la)*len(lb) then look for hit and miss110 """ creates a matrix of size len(la)*len(lb) then look for hit and miss
111 in it within eps tolerance windows """111 in it within eps tolerance windows """
112 gdn,fpw,fpg,fpa,fdo,fdp = 0,0,0,0,0,0112 gdn,fpw,fpg,fpa,fdo,fdp = 0,0,0,0,0,0
python/aubio/plot/notes.py+4−4
@@ -42,10 +42,10 @@ def plotnote_multi(lalist,title=None,fileout=None) : · 41 unmodified lines
42 42
43 43
44def plotnote_withends(la,plot_title=None) :44def plotnote_withends(la,plot_title=None) :
45 import numarray45 from numpy import array
46 import Gnuplot, Gnuplot.funcutils46 import Gnuplot, Gnuplot.funcutils
47 d=[]47 d=[]
48 x_widths = numarray.array(la[:,1]-la[:,0])/2.48 x_widths = array(la[:,1]-la[:,0])/2.
49 d.append(Gnuplot.Data(49 d.append(Gnuplot.Data(
50 la[:,0]+x_widths, # x centers50 la[:,0]+x_widths, # x centers
51 la[:,2], # y centers51 la[:,2], # y centers
@@ -57,10 +57,10 @@ def plotnote_withends(la,plot_title=None) : · 5 unmodified lines
57 57
58def plotnote_withoutends(la,plot_title=None) :58def plotnote_withoutends(la,plot_title=None) :
59 """ bug: fails drawing last note """59 """ bug: fails drawing last note """
60 import numarray60 from numpy import array
61 import Gnuplot, Gnuplot.funcutils61 import Gnuplot, Gnuplot.funcutils
62 d=[]62 d=[]
63 x_widths = numarray.array(la[1:,0]-la[:-1,0])/2;63 x_widths = array(la[1:,0]-la[:-1,0])/2;
64 d.append(Gnuplot.Data(64 d.append(Gnuplot.Data(
65 la[:-1,0]+x_widths, # x centers65 la[:-1,0]+x_widths, # x centers
66 la[:-1,1], # y centers66 la[:-1,1], # y centers
python/aubiodiffs-onset+0−2
@@ -3,8 +3,6 @@ · 2 unmodified lines
3"""Copyright (C) 2004 Paul Brossier <piem@altern.org>3"""Copyright (C) 2004 Paul Brossier <piem@altern.org>
4 4
5print aubio.__LICENSE__ for the terms of use5print aubio.__LICENSE__ for the terms of use
6
7or see LICENSE.txt in the numarray installation directory.
8"""6"""
9__LICENSE__ = """\7__LICENSE__ = """\
10 Copyright (C) 2004 Paul Brossier <piem@altern.org>8 Copyright (C) 2004 Paul Brossier <piem@altern.org>
python/aubiofilter-notes+1−1
@@ -78,7 +78,7 @@ def main(): · 77 unmodified lines
78 78
79 from aubio import notefilter,txtfile,gnuplot79 from aubio import notefilter,txtfile,gnuplot
80 """ load midi and raw data """80 """ load midi and raw data """
81 from numarray import array81 from numpy import array
82 notelist = array(txtfile.read_datafile(input))82 notelist = array(txtfile.read_datafile(input))
83 """ filter it out """83 """ filter it out """
84 notelist_filtered = notefilter.segraw_onsets4(notelist,winlength,eps)84 notelist_filtered = notefilter.segraw_onsets4(notelist,winlength,eps)
python/aubionotes+0−1
@@ -4,7 +4,6 @@ def do(filein,threshold): · 3 unmodified lines
4 4
5 import aubio.aubioclass5 import aubio.aubioclass
6 import aubio.median6 import aubio.median
7 #from numarray import around
8 from math import floor7 from math import floor
9 hopsize = 5128 hopsize = 512
10 bufsize = 40969 bufsize = 4096
python/aubioplot-notes+1−1
@@ -18,7 +18,7 @@ def parse_args (sysargs): · 17 unmodified lines
18def main (sysargs) :18def main (sysargs) :
19 from aubio.txtfile import read_datafile19 from aubio.txtfile import read_datafile
20 from aubio.gnuplot import plotnote,plotnote_do 20 from aubio.gnuplot import plotnote,plotnote_do
21 from numarray import array21 from numpy import array
22 filein,fileout = parse_args(sysargs)22 filein,fileout = parse_args(sysargs)
23 #print 'checking', fileerr, 'against', fileorg23 #print 'checking', fileerr, 'against', fileorg
24 """ load midi and raw data """24 """ load midi and raw data """
python/aubioweb.py+1−1
@@ -11,7 +11,7 @@ libapache-mod-python (apache2 prefered) · 10 unmodified lines
11sndfile-programs (sndfile-info)11sndfile-programs (sndfile-info)
12vorbis-tools (oggenc)12vorbis-tools (oggenc)
13python-gnuplot13python-gnuplot
14python-numarray14python-numpy
15 15
16Try the command line tools in aubio/python to test your installation.16Try the command line tools in aubio/python to test your installation.
17 17

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t