shithub: aubio

Download patch

ref: cd9b14278ed1a9941fc1c8f9fc2e29777d03a843
parent: 733c2f8f43b9b88e768a9bb53fc7008f00bb1cbf
author: Paul Brossier <piem@altern.org>
date: Sun Nov 6 06:34:28 EST 2005

move numarray import inside function
move numarray import inside function


--- a/python/aubio/onsetcompare.py
+++ b/python/aubio/onsetcompare.py
@@ -25,8 +25,6 @@
 see http://en.wikipedia.org/wiki/Receiver_operating_characteristic
 """
 
-from numarray import *
-
 def onset_roc(ltru, lexp, eps):
     """ compute differences between two lists 
           orig = hits + missed + merged 
@@ -74,6 +72,7 @@
     return l 
 
 def notes_roc (la, lb, eps):
+    from numarray import *
     """ creates a matrix of size len(la)*len(lb) then look for hit and miss
     in it within eps tolerance windows """
     gdn,fpw,fpg,fpa,fdo,fdp = 0,0,0,0,0,0