]> gitweb.michael.orlitzky.com - dunshire.git/commitdiff
Fix pylint warnings in matrices.py.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 10 Oct 2016 01:31:40 +0000 (21:31 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 10 Oct 2016 02:36:20 +0000 (22:36 -0400)
src/dunshire/matrices.py

index 52ba2a34c0352ac9d16744c64abc5ac195a50d7e..2006fd20427b999fd8061a74e89e03508b55f0f1 100644 (file)
@@ -111,7 +111,7 @@ def inner_product(vec1, vec2):
     if not len(vec1) == len(vec2):
         raise TypeError('the lengths of vec1 and vec2 must match')
 
-    return sum([x*y for (x,y) in zip(vec1,vec2)])
+    return sum([x*y for (x, y) in zip(vec1, vec2)])
 
 
 def norm(matrix_or_vector):
@@ -131,7 +131,7 @@ def norm(matrix_or_vector):
         2.0
 
     """
-    return sqrt(inner_product(matrix_or_vector,matrix_or_vector))
+    return sqrt(inner_product(matrix_or_vector, matrix_or_vector))
 
 
 def vec(real_matrix):