]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/matrix_vector.py
mjo: replace xrange() with range() for python-3.x compatibility.
[sage.d.git] / mjo / matrix_vector.py
index 2a0e9e8d54a8dd45dd473a04780a63823e5030cd..111712b863d3a0dcf9f730798a5efc9fcd236de6 100644 (file)
@@ -33,7 +33,7 @@ def isomorphism(matrix_space):
 
         sage: M = MatrixSpace(QQ,4,4)
         sage: (p, p_inv) = isomorphism(M)
-        sage: m = M(xrange(16))
+        sage: m = M(range(16))
         sage: p_inv(p(m)) == m
         True
 
@@ -148,8 +148,8 @@ def matrix_of_transformation(T, V):
             return L(x)
 
     entries = []
-    for j in xrange(n):
-        for i in xrange(n):
+    for j in range(n):
+        for i in range(n):
             entry = inner_product(apply(T,B[i]), B[j])
             entries.append(entry)