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
106106 return orig, missed, merged, expc, bad, doubled, l, labs
107107
108108 def notes_roc (la, lb, eps):
109− from numarray import transpose, add, resize
109+ from numpy import transpose, add, resize
110110 """ creates a matrix of size len(la)*len(lb) then look for hit and miss
111111 in it within eps tolerance windows """
112112 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
4242
4343
4444 def plotnote_withends(la,plot_title=None) :
45− import numarray
45+ from numpy import array
4646 import Gnuplot, Gnuplot.funcutils
4747 d=[]
48− x_widths = numarray.array(la[:,1]-la[:,0])/2.
48+ x_widths = array(la[:,1]-la[:,0])/2.
4949 d.append(Gnuplot.Data(
5050 la[:,0]+x_widths, # x centers
5151 la[:,2], # y centers
@@ -57,10 +57,10 @@ def plotnote_withends(la,plot_title=None) : · 5 unmodified lines
5757
5858 def plotnote_withoutends(la,plot_title=None) :
5959 """ bug: fails drawing last note """
60− import numarray
60+ from numpy import array
6161 import Gnuplot, Gnuplot.funcutils
6262 d=[]
63− x_widths = numarray.array(la[1:,0]-la[:-1,0])/2;
63+ x_widths = array(la[1:,0]-la[:-1,0])/2;
6464 d.append(Gnuplot.Data(
6565 la[:-1,0]+x_widths, # x centers
6666 la[:-1,1], # y centers
python/aubiodiffs-onset+0−2
@@ -3,8 +3,6 @@ · 2 unmodified lines
33 """Copyright (C) 2004 Paul Brossier <piem@altern.org>
44
55 print aubio.__LICENSE__ for the terms of use
6−
7−or see LICENSE.txt in the numarray installation directory.
86 """
97 __LICENSE__ = """\
108 Copyright (C) 2004 Paul Brossier <piem@altern.org>
python/aubiofilter-notes+1−1
@@ -78,7 +78,7 @@ def main(): · 77 unmodified lines
7878
7979 from aubio import notefilter,txtfile,gnuplot
8080 """ load midi and raw data """
81− from numarray import array
81+ from numpy import array
8282 notelist = array(txtfile.read_datafile(input))
8383 """ filter it out """
8484 notelist_filtered = notefilter.segraw_onsets4(notelist,winlength,eps)
python/aubionotes+0−1
@@ -4,7 +4,6 @@ def do(filein,threshold): · 3 unmodified lines
44
55 import aubio.aubioclass
66 import aubio.median
7− #from numarray import around
87 from math import floor
98 hopsize = 512
109 bufsize = 4096
python/aubioplot-notes+1−1
@@ -18,7 +18,7 @@ def parse_args (sysargs): · 17 unmodified lines
1818 def main (sysargs) :
1919 from aubio.txtfile import read_datafile
2020 from aubio.gnuplot import plotnote,plotnote_do
21− from numarray import array
21+ from numpy import array
2222 filein,fileout = parse_args(sysargs)
2323 #print 'checking', fileerr, 'against', fileorg
2424 """ load midi and raw data """
python/aubioweb.py+1−1
@@ -11,7 +11,7 @@ libapache-mod-python (apache2 prefered) · 10 unmodified lines
1111 sndfile-programs (sndfile-info)
1212 vorbis-tools (oggenc)
1313 python-gnuplot
14−python-numarray
14+python-numpy
1515
1616 Try the command line tools in aubio/python to test your installation.
1717

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