Showing the changes to python/tests/test_fvec.py (1 of 1 file). Show all
Unified · Split
| @@ -61,8 +61,7 @@ class aubio_fvec_test_case(TestCase): · 60 unmodified lines | ||
| 61 | 61 | a[1] = 1 |
| 62 | 62 | self.assertEqual (alpha_norm(a, 1), 1) |
| 63 | 63 | a = array([0, 1], dtype=float_type) |
| 64 | − from math import sqrt | |
| 65 | − assert_almost_equal (alpha_norm(a, 2), sqrt(2)/2.) | |
| 64 | + assert_almost_equal (alpha_norm(a, 2), .5*2.**.5) | |
| 66 | 65 | |
| 67 | 66 | def test_alpha_norm_of_none(self): |
| 68 | 67 | self.assertRaises (ValueError, alpha_norm, None, 1) |