projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1ad9dc3
)
python/tests/test_fvec.py: avoid import
author
Paul Brossier
<piem@piem.org>
Wed, 11 May 2016 05:06:08 +0000
(07:06 +0200)
committer
Paul Brossier
<piem@piem.org>
Wed, 11 May 2016 05:06:08 +0000
(07:06 +0200)
python/tests/test_fvec.py
patch
|
blob
|
history
diff --git
a/python/tests/test_fvec.py
b/python/tests/test_fvec.py
index
c147b1f
..
088fe68
100755
(executable)
--- a/
python/tests/test_fvec.py
+++ b/
python/tests/test_fvec.py
@@
-61,8
+61,7
@@
class aubio_fvec_test_case(TestCase):
a[1] = 1
self.assertEqual (alpha_norm(a, 1), 1)
a = array([0, 1], dtype=float_type)
a[1] = 1
self.assertEqual (alpha_norm(a, 1), 1)
a = array([0, 1], dtype=float_type)
- from math import sqrt
- assert_almost_equal (alpha_norm(a, 2), sqrt(2)/2.)
+ assert_almost_equal (alpha_norm(a, 2), .5*2.**.5)
def test_alpha_norm_of_none(self):
self.assertRaises (ValueError, alpha_norm, None, 1)
def test_alpha_norm_of_none(self):
self.assertRaises (ValueError, alpha_norm, None, 1)