ref: 0df6e9e74771bc4ed536a2439749efb1bf7828ba
parent: 1ad9dc32b2da162d9d1282c1b4f2869da1c4e32a
author: Paul Brossier <piem@piem.org>
date: Wed May 11 03:06:08 EDT 2016
python/tests/test_fvec.py: avoid import
--- a/python/tests/test_fvec.py
+++ b/python/tests/test_fvec.py
@@ -61,8 +61,7 @@
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)