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