Changeset 61680aa for python/aubio
- Timestamp:
- Dec 14, 2005, 2:42:45 PM (19 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 7473074
- Parents:
- 4b1e7e7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubio/onsetcompare.py
r4b1e7e7 r61680aa 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 """ … … 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
Note: See TracChangeset
for help on using the changeset viewer.