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