Showing the changes to python (2 of 2 files). Show all
Unified · Split
| @@ -72,17 +72,17 @@ def onset_diffs(ltru, lexp, eps): · 71 unmodified lines | ||
| 72 | 72 | return l |
| 73 | 73 | |
| 74 | 74 | def notes_roc (la, lb, eps): |
| 75 | − from numarray import * | |
| 75 | + from numarray import transpose, add, resize | |
| 76 | 76 | """ creates a matrix of size len(la)*len(lb) then look for hit and miss |
| 77 | 77 | in it within eps tolerance windows """ |
| 78 | 78 | gdn,fpw,fpg,fpa,fdo,fdp = 0,0,0,0,0,0 |
| 79 | 79 | m = len(la) |
| 80 | 80 | n = len(lb) |
| 81 | − x = resize(la[:,0],(n,m)) | |
| 82 | − y = transpose(resize(lb[:,0],(m,n))) | |
| 81 | + x = resize(la[:][0],(n,m)) | |
| 82 | + y = transpose(resize(lb[:][0],(m,n))) | |
| 83 | 83 | teps = (abs(x-y) <= eps[0]) |
| 84 | − x = resize(la[:,1],(n,m)) | |
| 85 | − y = transpose(resize(lb[:,1],(m,n))) | |
| 84 | + x = resize(la[:][1],(n,m)) | |
| 85 | + y = transpose(resize(lb[:][1],(m,n))) | |
| 86 | 86 | tpitc = (abs(x-y) <= eps[1]) |
| 87 | 87 | res = teps * tpitc |
| 88 | 88 | res = add.reduce(res,axis=0) |
| @@ -21,7 +21,7 @@ def parse_args(): · 20 unmodified lines | ||
| 21 | 21 | complexdomain|hfc|phase|specdiff|energy|kl|mkl|dual") |
| 22 | 22 | parser.add_option("-B","--bufsize", |
| 23 | 23 | action="store", dest="bufsize", default=512, |
| 24 | − help="buffer size [default=1024]") | |
| 24 | + help="buffer size [default=512]") | |
| 25 | 25 | parser.add_option("-H","--hopsize", |
| 26 | 26 | action="store", dest="hopsize", default=256, |
| 27 | 27 | help="overlap size [default=256]") |