From 95449248be0816ee707a1669c65abc3faeb9d3b8 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 4 Nov 2018 01:12:22 -0500 Subject: [PATCH] matrix_vector.py: use xrange everywhere. --- mjo/matrix_vector.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mjo/matrix_vector.py b/mjo/matrix_vector.py index 055e4aa..2a0e9e8 100644 --- a/mjo/matrix_vector.py +++ b/mjo/matrix_vector.py @@ -33,7 +33,7 @@ def isomorphism(matrix_space): sage: M = MatrixSpace(QQ,4,4) sage: (p, p_inv) = isomorphism(M) - sage: m = M(range(0,16)) + sage: m = M(xrange(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 range(0,n): - for i in range(0,n): + for j in xrange(n): + for i in xrange(n): entry = inner_product(apply(T,B[i]), B[j]) entries.append(entry) -- 2.44.2