projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
012b324
)
test_fvec.py: zero_crossing_rate almost equal
author
Paul Brossier
<piem@piem.org>
Wed, 11 Jul 2012 20:41:04 +0000
(14:41 -0600)
committer
Paul Brossier
<piem@piem.org>
Wed, 11 Jul 2012 20:41:04 +0000
(14:41 -0600)
interfaces/python/test_fvec.py
patch
|
blob
|
history
diff --git
a/interfaces/python/test_fvec.py
b/interfaces/python/test_fvec.py
index b374c4e116ad80cd33f708c0df6743c432c8fa54..80e8fceb36b3418c91f00e73be8cdecd1fee2e83 100644
(file)
--- a/
interfaces/python/test_fvec.py
+++ b/
interfaces/python/test_fvec.py
@@
-85,7
+85,7
@@
class aubio_fvec_test_case(TestCase):
def test_zero_crossing_rate(self):
a = array([0,1,-1], dtype='float32')
-
self.assertEquals (zero_crossing_rate(a), 1./3
)
+
assert_almost_equal (zero_crossing_rate(a), 1./3.
)
a = array([0.]*100, dtype='float32')
self.assertEquals (zero_crossing_rate(a), 0 )
a = array([-1.]*100, dtype='float32')